Garbage Collection
1 posts in topic
Flat View  Flat View

Posted By:   sridhar_tallapareddy
Posted On:   Thursday, September 4, 2003 09:43 PM

We can invoke garbage collector by calling System.gc().But,is it guarenteed that it'll be executed?If not,by calling the System.gc() in a finalize method, is it guarenteed of its execution?

Re: Garbage Collection

Posted By:   Viral_Shah  
Posted On:   Thursday, September 4, 2003 11:02 PM

hi shridhar,

first of all this que should pu categorised under Java language and not I18N :)

as such, you can NEVER invoke the GC with guarentee.. the specs says that System.gc() is just a request to the JVM which may or may not be catered immediately..

as far as finally method is concirned, its called when the GC is operating... so, calling GC from the finally is useless..

About | Sitemap | Contact