Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Webview memory leak

Cobra IceDec 15 2017 — edited Dec 18 2017

Ok so I like Webview.

Very useful, but have got an extreme memory leak.

Even a simple webview that browses between webpages or runs some simple javascript to click on something will soon crash with an outofmemory exception.

Just create and webview and let it jump between pages with lots of images and stuff.

Can also be between the exact same 2 pages all the time.

Maybe run some javascript on the page to click on something.

You will notice the memory growing steadily.

I suspect it have got something to do with the page cache for the webview not being cleared, but I have found no way to clear it and the cache seem to even survive between dropping one webview and creating a new one.

This is with java 8 and java 9.

Only way to release memory is seemingly to restart the application, because the garbage collector can not reclaim the memory, even if you destroy the webview object and recreate a new webview.

I can see a multitude of memory related bug reports that seem to go no where.

Is there any news on the webview memory leaks or is there a free pure java alternative to webview to display webpages and run some simple javascript on the web pages ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2018
Added on Dec 15 2017
1 comment
1,083 views