lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: [jira] Commented: (LUCENE-686) Resources not always reclaimed in scorers after each search
Date Tue, 17 Oct 2006 18:48:32 GMT
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.

Paul Elschot

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

View raw message