No.  You cannot force garbage collection.  However, you can make an object to become 'subject to' garbage collection by making it 'unreachable.'  (assigning the reference varaible to null, for example)
 
Because the garbage collector runs asynchronously to your program as a separate thread, you cannot predict when it will execute, which unreachable objects it will reclaim, and when it will reclaim those objects.
 
Tae
----- Original Message -----
From: Campbell
Sent: Thursday, November 04, 1999 8:20 AM
Subject: Garbage collection

(more of a java q, but seems fitting...)
 
Is there a way to force garbage collection, such as with delete in C++?
 
Phil

Reply via email to