πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18294

Re: I need help about Garbage Collector

#18294
From: William Yu
Date: Thu, 16 Jul 1998 00:00
21 lines
1364 bytes
FοΏ½bio Costa wrote:
> 
> I need explicity code to garbage collector clear my objects from memory.

Well, official you can use:

  System.gc();

Unfortunately, there is a design bug in JavaSoft's JVMs so the memory
doesn't get freed to the OS. (Which in turn means the OS can't give this
memory back to the JVM if required.)

You can do a simple test to verify this. Write a loop that creates
100,000 objects, frees the references, calls System.gc() and sleeps for
a few seconds to allow gc() to work. If gc() worked as advertised, you
would never get an out of memory error (the initial 100,000 objects must
fit in available memory though).

JavaSoft says they will fix this in starting at 1.2beta4 and perhaps
backfix prior versions if they get a better handle on the whats and
hows.
Technical Details
Message-ID: <35AEA062.66F95FBA@Bigfoot.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6ol371$8ld7@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,9b781c15268687d4
X-Google-Attributes: gidf74b3,public
From: William Yu <William_Yu@Bigfoot.com>
Subject: Re: I need help about Garbage Collector
Date: 1998/07/16
Message-ID: <35AEA062.66F95FBA@Bigfoot.com>
X-Deja-AN: 372202715
Content-Transfer-Encoding: 8bit
References: <6ol371$8ld7@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: American All-Risk Group (AARG)
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language