Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Controlling the Garbage Collector Date: Mon, 25 Jun 2012 09:05:28 -0400 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <6KSdnTwztJvtR0bSnZ2dnUVZ_t-dnZ2d@giganews.com> <_JmdnUu_Z-scJEHSnZ2dnUVZ_t6dnZ2d@giganews.com> <4fe27687$0$281$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 25 Jun 2012 13:05:37 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="03ebLEozl+tXCe7JS60Feg"; logging-data="21866"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iiudwz+IN7iDv327GMBCC" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: Cancel-Lock: sha1:Xp+ldF4yxZ5wz+Ga+7QE4TAsHg0= Xref: csiph.com comp.lang.java.programmer:15577 On 6/25/2012 8:28 AM, Jukka Lahtinen wrote: > Robert Klemme writes: > >> Long lived objects which live shorter than the application (i.e. not >> classes) are actually the Achilles heel of GC because it is very hard to >> tune the collector in a way that it does not visit those long living >> objects too often and yet run often enough to ensure enough free memory is > > It might be good to have a method to gell the GC that a certain > long-lived object is no longer needed. > For example, something like > System.gc(Object old) > where old is the object that has just been needed the last time. How would you call the method? -- Eric Sosman esosman@ieee-dot-org.invalid