www.StudyJava.org

Pure Java

It is currently Fri Sep 10, 2010 6:29 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: garbage collection
PostPosted: Mon Apr 23, 2007 5:41 pm 
Offline

Joined: Mon Apr 23, 2007 11:08 am
Posts: 29
Hi All,

Everytime I am confusing with the questions like "How many objects eligible for garbage collection when the given code completes?". Please anyone explain me some points or tips to get out of from this type of questions.


 
 Profile  
 
 Post subject: Re: garbage collection
PostPosted: Fri Apr 27, 2007 4:41 am 
Offline

Joined: Mon Apr 23, 2007 4:01 am
Posts: 18
Garbage collection is nothing but cleaning up the unreachable instance or objects like File Handlers..etc. We can explicitly call System.gc() or Runtime.gc() method to cleanup the unreachable objects. Actually we dont want to use any of the garbage collection methods , In 1.4.1 version we have 3 different Garbage Collection algorithm, that will automatically run cleanup the garbage. Otherwise we can use finalize() method for calling these gc() methods.
Take a look at this link for more info..
http://java.sun.com/developer/technical ... LT/RefObj/


 
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Google
 




Powered by phpBB © 2002, 2006 phpBB Group
[ Time : 0.120s | 12 Queries | GZIP : Off ]