Kelvin Tan wrote:
> If the object has a close() method with public modifier, isn't it a common 
> idiom that client code needs to invoke close() explicitly? If there's no 
> real need to call close, maybe it can be changed to protected?

Yes, that is a common idiom.  In the case of Lucene's FSDirectory, it's still a 
good idea to close it when you know its no longer needed, to minimize the 
number of open files, but sometimes it is difficult to know when it is no 
longer needed.  Finalizers are intended for precisely this purpose.  But you're 
right, probably this should be better documented.

Doug


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

Reply via email to