[android-developers] WebView memory leak

2010-06-28 Thread Mathias Lin
I have an activity using an xml layout where a WebView is embedded. I am not using the WebView in my activity code at all, all it does is sitting there in my xml layout. Now, when I finish the activity, I find that my activity is not being cleared from memory. (I check via hprof dump). The

Re: [android-developers] WebView memory leak

2010-06-28 Thread Mathias Lin
Another test with little modification shows: when I create the WebView programatically and set the activity ('this') as the context, the activity would still remain in memory. When I use getApplicationContext() though, it's ok and the activity get's removed without any kept references. Filed a