On Tuesday 17 October 2006 20:32, Chris Hostetter wrote:
> 
> : But as long as there is no real a memory leak, what is the point of
> : adding this close functionality?
> 
> I think the concern is not so much that Lucene core as is has any leaks --
> but that subclasses of core implimentations have no mechanism for safely
> managing resources.  Custom Directory implimenations that rely on close()
> or custom Scorers that try to do anything complex involving external
> resources would have leaks of whatever resource they need to explicitly
> manage.

I remember being surprised that Lucene Scorers do not need a closing
method to manage their resources. The garbage collector does this.

When custom Scorers and/or Directories need a close method, it can
also be provided by subclassing Scorer, IndexSearcher and Directory
in the custom code.
Not providing this close method in the Lucene core passes the message
that a working implementation is possible without it.

Regards,
Paul Elschot

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to