static variables are bad when there is a back reference to the Activity instance. Because activities recreated several times in the life-cycle of the use of an app (for example when you switch your phone).
For example, the following code is safe:
private static Long mMyLong;
But this one is not safe :
private static Context mContext;
Be careful sometimes, there are some non obvious back references.
To avoid this kind of trouble you should store your static HashMap in your application class (you can find here my other post about application class creation https://stackoverflow.com/a/13994622/1789730). So your hashmap will be created once regardless of your activities lifecycle. Besides, you will gain in performance. To be really sur to not keep any reference, you can set to null the hashmap and its content in YourActivity.onDestroy() and recreate it in YourActivity.onCreate().
You can make the following experience to be sur if hashmap keeps any death references. Put the hashmap in the application class like said above. Flip your phone to portrait/landscape to recreate your activity. So if your activity crashes by using the hashmap objects, that means it keeps references to your activity.