aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Garbage collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Garbage collection" Watch "Garbage collection" New topic
Author

Garbage collection

Whiz Kid
Greenhorn

Joined: Jul 02, 2002
Posts: 6
Hey,
I am not able to follow the Concept of garbaghe collection and How to enforce it in a program.
Can anyone help me with this and any resources or links regardiong this will be of great help.
thaanks So much
Gowri


gowri Venkatesh
Binu K Idicula
Ranch Hand

Joined: Jul 11, 2002
Posts: 99
You cannot enforce garbage collection. But you can request the system to do that by calling System.gc().
Garbage colector is a low priority thread running asynchronously to your program exacution threads.
It detects unreachable objects, mark them ,invoke it's finalize (if overridden ), and frees memory all in the background with no specific time bound.
You cannot specify the exact time of garbage collection.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Good article on garbage collection:
Reference Objects and Garbage Collection


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Garbage collection