lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert engels <>
Subject Re: [jira] Commented: (LUCENE-623) RAMDirectory.close() should have a comment about not releasing any resources
Date Sun, 09 Jul 2006 11:53:45 GMT
I think the only time setting a object reference to null is during a  
"close" type operation is if the object is in some way shared (or  
could be), and the top-level object can be reopened or used again.  
Since no operations are valid on an IndexReader after close, the  
releasing of private object references seems to just be "noise".

On Jul 9, 2006, at 1:58 AM, Chris Hostetter wrote:

> : Just out of curiousity, does Lucene hold onto a RAMDirectory  
> instance
> : somewhere after it has called close on it?  If so, that would  
> have been
> : the ideal place to fix it any kind of "leak".
> Not that I'm aware of.  In my opinion there was no leak, i was just  
> trying
> to make RAMDirectory.close() do it's best to release the resources  
> it was
> holding on to.
> : 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?)
> -Hoss
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message