🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12735

Memory Leaks Issues with Swing in JBuilder 2 - Help!

#12735
From: Guerry A. Semones
Date: Mon, 09 Nov 1998 00:00
45 lines
2244 bytes
We are experiencing memory leak issues. 

We are using Swing 1.0.3 and JDK 1.1.6 with the latest JBuilder 2 
(upgraded).

We have an application with three tabbed panes.
Each pane contains several panels with controls.  From these panels, we
launch various pop-up jdialog windows containing panels with controls.  

Each time we pop up one of these windows and then exit that window, we
are not able to reclaim all of the memory.  To cause this to happen, we 
have tried the following: 

1. overridden the dispose methods to:
2. set objects to null
3. remove listeners and set those listener objects to null
4. requesting garbage collection all over the place with System.gc()
5. anything else we could think of.

We are getting memory back, but not all of it under all circumstances.  

One of the main things that is getting trapped are object arrays
that seem to be tied into Swing components (combos, etc.).

Also, if we return to the screen we had built and disposed of before 
GC happens, it looks like all of the original memory from the first 
invocation gets trapped underneath the second invocation and never 
gets freed, despite nulling, etc.  

If GC happens before the second invocation, we do pretty well.

We're using JInsight and another profiler to look at memory usage.

Help!  Any suggestions are welcome, even if we seem to have tried them.

Thanks in advance,

Guerry


-- 
Guerry A. Semones                           guerry.semones@wwt.com 
Chief Software Architect                    gsemones@primary.net 
Internet Business Applications Team Leader  (314) 919-1567 (w)
World Wide Technology, Inc.
Technical Details
Message-ID: <3647A5DA.FB0246ED@primary.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,eef8a9bb68be6bba,start
X-Google-Attributes: gid111d45,public
From: "Guerry A. Semones" <gsemones@primary.net>
Subject: Memory Leaks Issues with Swing in JBuilder 2 - Help!
Date: 1998/11/09
Message-ID: <3647A5DA.FB0246ED@primary.net>
X-Deja-AN: 410164396
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: gsemones@primary.net
Newsgroups: borland.public.jbuilder.java.swing