Memory leak with java 1.6.0_20 on MacOS X 10.6
Status: Beta
Brought to you by:
smichaud
Applet memory is not released with the latest version of Firefox on the latest MacOS X 10.6 with all updates. Eventually this ends up in an OutOfMemory crash.
Interestingly, the same bug happens with Safari with the embedded JVM. It does not happen with Safari when using applets in external processes.
Still, if there was a way to avoid this dire bug with Firefox...
There is an old thread about the bug on java-dev :
http://lists.apple.com/archives/java-dev/2009/Oct/msg00042.html
Actually applet memory *is* released, but not always and not
consistently. So, particularly if you rapidly switch between pages
containing applets, you can fairly quickly start getting the Java
OutOfMemory exception. Once this has started happening, the JVM is
hosed, and you must quit and restart the browser.
As you said, the same problem happens in Safari. I suspect it also
happens when the JVM is run out-of-process ... though it may take a
bit longer to happen.
I doubt very much I'll be able to do anything about this :-(
> http://lists.apple.com/archives/java-dev/2009/Oct/msg00042.html
I know for a fact that applet.destroy() *is* called when a page is
reloaded, or when you switch between pages. The problem (whatever it
is) lies deeper in the JVM.
Thanks for your comments. Too bad we can only wait for Apple to do something. I gave up sending them bug reports long ago, they are not as professional as you when processing them.