OSDN Git Service

Merge change 21112 into donut
[android-x86/packages-apps-Music.git] / src / com / android / music / TrackBrowserActivity.java
index 1f1adf6..14764ff 100644 (file)
@@ -240,6 +240,11 @@ public class TrackBrowserActivity extends ListActivity
                 c.close();
             }
         }
+        // Because we pass the adapter to the next activity, we need to make
+        // sure it doesn't keep a reference to this activity. We can do this
+        // by clearing its DatasetObservers, which setListAdapter(null) does.
+        setListAdapter(null);
+        mAdapter = null;
         unregisterReceiverSafe(mScanListener);
         super.onDestroy();
     }