Gaurav Vaish <me@privacy.net> wrote:
If there are no other instances of the object then this should suffice.. am
I right?
No. "No other instances of the object" doesn't make sense - an object
*is* an instance. Did you mean if there are no other references to the
object? If so, that's enough to make it eligible for garbage collection
- but it doesn't mean that it will instantly be garbage collected, or
that the finalizer will immediately be called.
Also note that if it's a local variable, or if it's an instance field
of another object which is going to become eligible for garbage
collection, you don't need to set it to null.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too