![]() |
Rabbit Escape
2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
|
Static Public Member Functions | |
static synchronized BitmapCache< AndroidBitmap > | instance (Resources resources) |
Private Member Functions | |
SingletonBitmapCache () | |
Static Private Member Functions | |
static long | cacheSize () |
Static Private Attributes | |
static BitmapCache< AndroidBitmap > | theInstance |
I feel dirty, but I don't know how to ensure we don't leak Bitmaps if we make a new cache for every GameActivity. If I clean up in onPause I get errors because some of the Bitmaps I am recycling are still being used in another thread.
So, a singleton that is also stateful because we update the loader because we get a new Resources instance, just in case old ones become invalid.
Please, tell me how to do this better.
|
private |
Don't construct one of these.
|
staticprivate |
|
static |
|
staticprivate |