On Monday, July 15, 2002, at 10:19 PM, Kelvin Tan wrote:
>> FSDirectory closes files as they're GC'd, so you >> don't have to explicitly close the IndexReaders or Searchers. >> >> Doug >> > > hmmm...is this documented somewhere? I go through quite abit of trouble > just to close Searchers (because Hits become invalid when the > Searcher is > closed). > > If the object has a close() method with public modifier, isn't it a > common > idiom that client code needs to invoke close() explicitly? I absolutely agree. If letting it get GC'ed is fine, then just about any other name, like "dispose" might be better. > If there's no > real need to call close, maybe it can be changed to protected? I wouldn't go that far. ~ David Smiley -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
