The Artima Developer Community
Sponsored Link

Not able to free the memory

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Not able to free the memory

Posted by Pradeep Kumar Das on 17 Sep 1998, 2:32 AM

I have observed that AWT and Swing components that are added
to a top-level component never gets garbage collected as long
as the top-level component exists(i.e. not been made null).

We have developed an MDI application using Swing.This app
contains child windows(JInternalFrames) and dialogs(which are
also designed as JInternalFrames).Upon bringing such JInternalFrames
15-20 times in a 64MB system(WIN - 95) the Application throws
OutOfMemoryError.And after sometime the whole app goes for a toss.
I believe the JVM before throwing an OutOfMemoryError should run the
GC and any unreferenced object on the heap should be GC'ed.Let me
tell you here that our reference to these JInternalFrames are made
null after these windows are closed.

I suspect some of the AWT & Swing classes might be keeping
reference to this objects which they never seem to release.
I would request you all to reply soon if you have any idea
why this is happening? If u want I can provide you with test codes.

Thanks in advance

Pradeep




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us