The Artima Developer Community
Sponsored Link

Setting References To Null

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Setting References To Null

Posted by Brian Smith on 03 Feb 1999, 7:07 AM

If I know that will no longer be using an object, does the
setting of member variable references to null faciliate
garbage collection in any way? For example if I know that I am
done with Object A and A implements a dispose() method that
"cleans up" or sets all references to null, does this impact
garbage collection in any way? Based upon my reading I would
think it would be difficult, if not impossible, to know if this
really has any impact on GC - since each VM may implement GC
differently.

TIA

Brian




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us