We are just using webview in JRE 6 and JRE 7. We ran the sample app with cnn.com loaded in to the webview. After that we open the task manager to see the current memory usage. Now on webview if we select the content using double clck, mouse drag or CTRL-A the memory reported in task manager starts going up and never comes down.
After trying the content selection few times the application exits with OOM error.
JRE 8 is not an option at this time. We will try with it any way to see if it solves the issue.
Seems to be hanging onto image data. For me I see HeapByteBuffer references that stick around each time I load the page. To reproduce this I used JVisualVM to:
- I Opened a page in the WebView.
- Did a heapdump.
- Then changed the URL, and viewed the new page in the same webview.
- Did another heapdump.
- Diffed the heapdump and it shows a growing number of byte instances.
If you look at the instances it shows a HeapByteBuffer with a large number of items in it.