Affects Version/s: current
Fix Version/s: None
Component/s: JDIC API (package org.jdesktop.jdic.browser)
Operating System: All
After a WebBrowser is disposed, NativeEventThread still keeps a reference to
the WebBrowser instance preventing it to be garbage collected, in fact the
whole parent window can't be garbage collected unless the WebBrowser is removed
from its parent.
Tested only in Windows but it should happen in all platforms.
The reference is in webBrowsers vector. The webbrowser is added in
NativeEventThread.attachWebBrowser method and is never removed.
So also the memory used by the webBrowsers vector is increasing as more
instances are being created and disposed, which is also a memory leak.
Possible solution would be to change vector to map and remove from map with
Integer as keys and IWebBrowser as values, and removed from map after dispose.