aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/cyanogenmod/wallpapers/photophase/TextureManager.java
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2013-08-20 04:30:46 +0200
committerJorge Ruesga <jorge@ruesga.com>2013-08-20 04:30:46 +0200
commited09bbd4f29dc28dcfb98147143dfcdc3291f52d (patch)
tree2dea3018a2bf7a0ec0fad37b4c6a2458ac31a141 /src/org/cyanogenmod/wallpapers/photophase/TextureManager.java
parent3b5593668c83fc9990c7c2c9bd3d576c66a0e9d5 (diff)
downloadandroid_packages_wallpapers_PhotoPhase-ed09bbd4f29dc28dcfb98147143dfcdc3291f52d.tar.gz
android_packages_wallpapers_PhotoPhase-ed09bbd4f29dc28dcfb98147143dfcdc3291f52d.tar.bz2
android_packages_wallpapers_PhotoPhase-ed09bbd4f29dc28dcfb98147143dfcdc3291f52d.zip
More recycle stuff (#26)
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/org/cyanogenmod/wallpapers/photophase/TextureManager.java')
-rw-r--r--src/org/cyanogenmod/wallpapers/photophase/TextureManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/TextureManager.java b/src/org/cyanogenmod/wallpapers/photophase/TextureManager.java
index 8f17162..4d4414c 100644
--- a/src/org/cyanogenmod/wallpapers/photophase/TextureManager.java
+++ b/src/org/cyanogenmod/wallpapers/photophase/TextureManager.java
@@ -100,6 +100,7 @@ public class TextureManager implements OnMediaPictureDiscoveredListener {
}
if (oldTextureInfo.bitmap != null) {
oldTextureInfo.bitmap.recycle();
+ oldTextureInfo.bitmap = null;
}
}
} else {
@@ -287,6 +288,7 @@ public class TextureManager implements OnMediaPictureDiscoveredListener {
}
// Return the bitmap
info.bitmap.recycle();
+ info.bitmap = null;
}
} catch (EmptyQueueException eqex) {
// Ignore
@@ -294,6 +296,7 @@ public class TextureManager implements OnMediaPictureDiscoveredListener {
// Recycle the bitmaps
for (GLESTextureInfo ti : sRecycledBitmaps) {
ti.bitmap.recycle();
+ ti.bitmap = null;
}
sRecycledBitmaps.clear();