Skip to content

Commit

Permalink
Fixed bug with the scaled bitmaps image list when the bitmaps weren't…
Browse files Browse the repository at this point in the history
… scaled. This is code that I broke by removing the check for the image list containing direct references to the original bitmaps.
  • Loading branch information
forteri76 committed Jun 20, 2014
1 parent d69747c commit b44c418
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.jfedor.frozenbubble"
android:versionCode="35"
android:versionName="3.2">
android:versionCode="36"
android:versionName="3.3">

<supports-screens
android:smallScreens="true"
Expand Down
8 changes: 7 additions & 1 deletion src/org/jfedor/frozenbubble/GameView.java
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,13 @@ public void cleanUp() {
int size = mImageList.size();
while (size > 0) {
BmpWrap bmpWrap = mImageList.elementAt(--size);
bmpWrap.bmp.recycle();
/*
* If the bitmaps were not scaled, then they will already have
* been recycled.
*/
if (bmpWrap.bmp != null) {
bmpWrap.bmp.recycle();
}
bmpWrap.bmp = null;
}
mImageList.clear();
Expand Down

0 comments on commit b44c418

Please sign in to comment.