aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Swing Memory Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing Memory Issue" Watch "Swing Memory Issue" New topic
Author

Swing Memory Issue

Vijay Ram
Greenhorn

Joined: Feb 02, 2004
Posts: 4
Hi,
I have a swing applet which is in a popup launched from a html parent window. I have issues when I close the applet and the parent page. Many time i still find memory lingering (java coffee cup icon is present and task manager shows the IEXPLORE running). I can understand that if the parent is used to navigate to another site and only the applet is closed I can have memory still not cleared. But some times after i launch both the pages , i close the parent and then i open a new iexplore. now if i close the applet popup i still have memory lingering although the parent and the child (pop-up) are closed.
Is this an issue bcos of memory handling with my code (i set all allocated objects to null) or is this expected with Swing?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8867
    
    8

I think this behavior is expected, and it's not just because you are using Swing. The JVM does not give up memory it has allocated since it would waste precious CPU cycles to allocate it, free it, and the next time an applet is loaded re-allocate it.
[ February 02, 2004: Message edited by: Joe Ess ]

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Vijay Ram
Greenhorn

Joined: Feb 02, 2004
Posts: 4
Thanks Joe. I was under the same impression that its an expected performance. But if so I wonder why many applications developed dont cause much issues or why developers have no reservations using it. Performance centric applications might suffer due to this then.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I think the name "Newbie Newbie" is violating the naming policy in the Ranch... I would suggest u to change ur name before ur account is closed down...
Here is the naming policy


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Vijay Ram
Greenhorn

Joined: Feb 02, 2004
Posts: 4
Hey,
Thanks a lot for bringing that to my attention. In a desperate bid to seek for answers it was my bad that i didn't pay enuf attention to this detail. when enrolling.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing Memory Issue