lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: [jira] Commented: (LUCENE-623) RAMDirectory.close() should have a comment about not releasing any resources
Date Sun, 09 Jul 2006 15:43:57 GMT
On 7/9/06, Chris Hostetter <hossman_lucene@fucit.org> wrote:
> : This patch, while not doing much harm, is not really "best practice" in
> : Java and the existing RAMDirectory close() was correct.
>
> Why is this not a best practice?  (or do you mean that in a "not
> particularly good" sense instead of "bad" sense?)

Right... some people used to null out references with the idea that it
would help out GC.  With modern VMs, it's normally a net performance
loss.  If the object you are releasing contains other references, one
should not normally null those references.

It only makes sense to null references when the lifetime of the parent
is greater.

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message