E.g. in flex, the wrappers around old enums do not ever call close(), too. I
am not sure if this is a problem for TermEnums wrapped by TermsEnum there.
The new enums do not implement j.io.Closeable at all.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]

> -----Original Message-----
> From: Michael McCandless [mailto:[email protected]]
> Sent: Sunday, December 27, 2009 1:11 PM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: TermDocs.close
> 
> It's confusing... but it is in fact safe not closing it (for Lucene's
> core IndexReader impls) -- because the IndexInputs that
> SegmentTermDocs/Positions use are clones, their close methods are a
> no-op.
> 
> Mike
> 
> On Sun, Dec 27, 2009 at 6:37 AM, John Wang <[email protected]> wrote:
> > Hi:
> >   I see TermDocs.close not being called when created with TermQuery:
> > TermQuery creates it and passes to TermScorer, and is never closed.
> >   I see TermDocs.close actually closes the input stream.
> >   Is it safe not closing TermDocs?
> > Thanks
> > -John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to