: I think finalize() is that not trustworthy, in that it may : never be called, e.g. in case GC happened to not collect the specific : object, : and so the way for programmers to guarantee execution of any code : at shutdown is with shutdown hooks, I guess this is that what you meant,
i'm not suggesting that this be documented as a *reliable* garunteed way to get a commit, just as a safety net for nocie users. I don't know enough about finer points of shutdown hooks to comment on the distinctio, but my off the cuff assumption is that a shutdown hook would be a bad idea ... in a long running program wouldn't thta keep the IndexWriter from being GCed until shutdown? : > Yes. Totally unexpected magical behaviour. : > What if I didn't commit something on purporse? ... : Applications can call rollback() in this case. or more specificly along the lines of my original point: people who read the docs carefully are more likely to know about rollback and call it explicitly, or to see the autoClose option and explicitly set it to false (or use a constructor where it defualts to false) -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org