OSDN Git Service

Call the WebViewCore's freeMemory instead of just clearCache
authorDerek Sollenberger <djsollen@google.com>
Wed, 10 Jun 2009 19:37:21 +0000 (15:37 -0400)
committerDerek Sollenberger <djsollen@google.com>
Wed, 10 Jun 2009 19:37:21 +0000 (15:37 -0400)
src/com/android/browser/TabControl.java

index d880d40..f66df69 100644 (file)
@@ -684,11 +684,11 @@ class TabControl {
             return;
         }
 
-        // free the WebView cache
-        Log.w(LOGTAG, "Free WebView cache");
+        // free the WebView's unused memory (this includes the cache)
+        Log.w(LOGTAG, "Free WebView's unused memory and cache");
         WebView view = getCurrentWebView();
         if (view != null) {
-            view.clearCache(false);
+            view.freeMemory();
         }
         // force a gc
         System.gc();