aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-01-13 12:40:48 -0800
committerScott Jackson <daneren2005@gmail.com>2013-01-13 12:40:48 -0800
commitc4130b7caa3ac11d4c1b9fdebf8459270a6b3ff1 (patch)
tree30589545a143ca10ffd1339aa5d9b1c3cc0391d7 /subsonic-android/src
parente4e858798d3bd84d8cdf9ce153796d7d712c930c (diff)
downloaddsub-c4130b7caa3ac11d4c1b9fdebf8459270a6b3ff1.tar.gz
dsub-c4130b7caa3ac11d4c1b9fdebf8459270a6b3ff1.tar.bz2
dsub-c4130b7caa3ac11d4c1b9fdebf8459270a6b3ff1.zip
Make sure to immediately recycle non-scaled bitmap
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/FileUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/FileUtil.java b/subsonic-android/src/github/daneren2005/dsub/util/FileUtil.java
index 421226cf..d210920b 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/FileUtil.java
@@ -102,7 +102,9 @@ public class FileUtil {
File albumArtFile = getAlbumArtFile(context, entry);
if (albumArtFile.exists()) {
Bitmap bitmap = BitmapFactory.decodeFile(albumArtFile.getPath());
- return bitmap == null ? null : Bitmap.createScaledBitmap(bitmap, size, size, true);
+ Bitmap scaledBitmap = (bitmap == null) ? null : Bitmap.createScaledBitmap(bitmap, size, size, true);
+ bitmap.recycle();
+ return scaledBitmap;
}
return null;
}