Bugs item #1524187, was opened at 2006-07-17 18:59
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=1524187&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Applet
>Group: v11
Status: Open
Resolution: None
Priority: 5
Submitted By: Tobias T (twobeers)
>Assigned to: Egon Willighagen (egonw)
Summary: memory hole: parent Component + Jmol don't get finalized

Initial Comment:
Hey guys,

thank you so much for providing Jmol. However, there is
one bug that really bugging me: Jmol has a memory hole,
and this means that by usign Jmol, my client program
has one too :-(

Apparently Jmol somehow stores a reference to itself
and the Component passed to JmolViewer.allocateViewer()
in some place that itself remains referenced forever:
Repeated invocations of allocateViewer() will
continuously increase the memory consumption, until a
java.lang.OutOfMemoryError occurs.

If an empty JPanel is passed as the component, the
memory usage increases by about 32 KBytes per
invocation. The JPanel itself is never finalized even
when the client program stores no references to it; the
JPanel itself is lightweight at less than 1 KByte.

I've attached a JUnit testcase that illustrates the
bug. The memory usage shouldn't increase from the start
to the end of the testcase, but it does increase by
tens of Megabytes (on my computer, using JDK 1.5.0_06
under win32, 1000 iterations yield 32,326,200 bytes lost). 

I've overriden the JPanel's finalize() method to
illustrate that the component never gets garbage
collected. Because the JPanel itself doesn't consume
this much memory, and because the Jmol Viewer is the
only thing that stiill has a reference to the panel, it
follows that the Jmol Viewer never gets garbage
collected either.



----------------------------------------------------------------------

>Comment By: Bob Hanson (hansonr)
Date: 2006-08-22 18:24

Message:
Logged In: YES 
user_id=1082841

we need help solving this one. Demo pages necessary 

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2006-07-17 19:23

Message:
Logged In: YES 
user_id=1082841

Tobias, I'd love to get this fixed. What do you recommend?

I think I have also noticed that all instances of Jmol
remain "alive" until the browser application is closed, even
when the page is abandoned.
 
Do you have any references we could look at regarding proper
finalization upon page exit in a browser?

Bob Hanson


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=1524187&group_id=23629

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to