On Tue, Jan 4, 2011 at 11:33 AM, Michael Herndon <mhern...@o19s.com> wrote: > Idisposable has more to do releasing resources and gc >
according to the docs here: http://msdn.microsoft.com/en-us/library/yh598w02.aspx It seems the 'using' statement acts like java's 'finally' block (and will be called even in an exceptional case), thus, if you make all Closeables as IDisposables, you will get the worst-case performance pattern that I mentioned. Many of lucene's objects (IndexReader, IndexWriter) are quite expensive to close/open and so this is why i mentioned, IDisposable can be considered harmful.