Revert change recycling bitmap on Tab.destroy()
Instead we recycle the bitmaps when tab is removed from the view.
Change-Id: Ifa82d5b0311770c85ee7c66e369464c33dfb4126
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index b951306..37303a5 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -1396,14 +1396,7 @@
* Destroy the tab's main WebView and subWindow if any
*/
void destroy() {
- if (mScreenShot != null) {
- mScreenShot.recycle();
- mScreenShot = null;
- }
- if (mCapture != null ) {
- mCapture.recycle();
- mCapture = null;
- }
+
if (mPostponeDestroy) {
mShouldDestroy = true;
return;
@@ -1446,6 +1439,14 @@
if (mParent != null) {
mParent.mChildren.remove(this);
}
+ if (mScreenShot != null) {
+ mScreenShot.recycle();
+ mScreenShot = null;
+ }
+ if (mCapture != null ) {
+ mCapture.recycle();
+ mCapture = null;
+ }
deleteThumbnail();
}