🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Swing, NT4, JDK1.2 and Memory

#12519
From: Kim W Topley [0000000]
Date: Thu, 17 Dec 1998 00:00
24 lines
1399 bytes
Java Team wrote:
> 
> Hello Swingmen and Swingwomen
> 
> We have big memory problem using Swing 1.1, NT4 and Jdk1.2.
> Does anyone knows how to resolve swing memory leak problem.
> We would like to know if there are any efficient workaround for all those
> nasty memory problem
> To show you a memory leak example try the source file attached.
> 


Bad example. Change the loop in the clearButton_actionPerformed method 
to this:

	for (int i = 0; i < list.length; i++) {
      		list[i].dispose();
      		displayPanel.remove(list[i]);
    	}


and your "memory leak" will go away 

:-)
Technical Details
Message-ID: <3678E257.76B7@jpmorgan.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <75ajhv$9jq$1@ns02.datanetworks.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,96bdd5f3a256c7,start
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,96bdd5f3a256c7,start
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: f5d71,96bdd5f3a256c7,start
X-Google-Attributes: gidf5d71,public
From: "Kim W Topley [0000000]" <topley_kim@jpmorgan.com>
Subject: Re: Swing, NT4, JDK1.2 and Memory
Date: 1998/12/17
Message-ID: <3678E257.76B7@jpmorgan.com>
X-Deja-AN: 423209966
Content-Transfer-Encoding: 7bit
References: <75ajhv$9jq$1@ns02.datanetworks.ch>
To: Java Team <vincent.haenni@mhinformatics.ch>
Content-Type: text/plain; charset=us-ascii
Organization: J.P. Morgan & Co
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java,comp.lang.java.gui