Article View: borland.public.jbuilder.java.api
Article #1472Re: Memory is not freed !
From: Mark Thornton
Date: Fri, 14 Dec 2001 22:13
Date: Fri, 14 Dec 2001 22:13
28 lines
2728 bytes
2728 bytes
"Chris Smith" <cdsmith@twu.net> wrote in message news:MPG.1684216856c3a46c989b86@news.altopia.com... > Laurent Souriau wrote ... > > I am trying to solve the following problem : > > > > I wrote a Java application that receives 2000 messages in 5 different > > windows. Each window display the messages in its own JTextarea. > > > > I look at memory used by javaw.exe with the Task manager. > > > > I see that my displaying method doesn't free 7 Mbytes of memory ! > > However the garbage collector should free my variables . > > The garbage collector frees memory and places it back into a pool that is > available to this process. It *may*, but won't necessarily, return that > memory to the operating system when it's collected. Current virtual > machines don't do that... after all, the memory will simply be swapped > out if it remains idle for long; why go to the expense of rearranging > things so as to release virtual memory to the OS. > > If we were talking about RAM, this would be a problem. > > Chris Smith Actually at least some current JVM do return memory to the OS, although not necessarily as much or as quickly as you might like. I'm fairly sure that JDK 1.3 does.
Technical Details
Message-ID:
<fQuS7.4745$pb4.650999@news2-win.server.ntlworld.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!news2.euro.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mailReferences:
<9vd6nk$4e0$1@s1.read.news.oleane.net> <MPG.1684216856c3a46c989b86@news.altopia.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113ae9,187c425c309f6a3 X-Google-Attributes: gid113ae9,public X-Google-Thread: 10a146,187c425c309f6a3 X-Google-Attributes: gid10a146,public X-Google-Thread: f74b3,187c425c309f6a3 X-Google-Attributes: gidf74b3,public X-Google-Thread: 1089d0,187c425c309f6a3 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-12-14 14:18:43 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!news2.euro.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "Mark Thornton" <m.p.thornton@ntlworld.com> Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.help,comp.lang.java.programmer References: <9vd6nk$4e0$1@s1.read.news.oleane.net> <MPG.1684216856c3a46c989b86@news.altopia.com> Subject: Re: Memory is not freed ! Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: <fQuS7.4745$pb4.650999@news2-win.server.ntlworld.com> Date: Fri, 14 Dec 2001 22:13:28 -0000 NNTP-Posting-Host: 80.4.113.101 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 1008368011 80.4.113.101 (Fri, 14 Dec 2001 22:13:31 GMT) NNTP-Posting-Date: Fri, 14 Dec 2001 22:13:31 GMT Organization: ntl Cablemodem News Service