File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes GC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "GC " Watch "GC " New topic



Joined: Apr 15, 2003
Posts: 3
When does the Garbage Collector gets invoked--when the memory is full or for every unit of interval ?
When the application comes to halt, does all the objects get removed by GC ?
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Damien Howard
Ranch Hand

Joined: Apr 01, 2003
Posts: 456
There is not guarantee as to when the GC will run. IT is up to the implementor of the VM. But usually it should run before you run out of any memory, but again no guarantees.
It is sorta covered in the JavaRanch Style Guide.
subject: GC
jQuery in Action, 3rd edition