Implement the Dispose pattern properly in classes with Close
------------------------------------------------------------

                 Key: LUCENENET-468
                 URL: https://issues.apache.org/jira/browse/LUCENENET-468
             Project: Lucene.Net
          Issue Type: Sub-task
          Components: Lucene.Net Contrib, Lucene.Net Core, Lucene.Net Demo, 
Lucene.Net Test
    Affects Versions: Lucene.Net 2.9.4, Lucene.Net 2.9.2, Lucene.Net 3.0.3, 
Lucene.Net 2.9.4g
         Environment: all
            Reporter: Christopher Currens
             Fix For: Lucene.Net 3.0.3


Implement the dispose pattern as [suggested 
here|http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx] on any class that 
implements Close().  Be sure to implement the IDisposable.Dispose() only in the 
base class, and have all sub-class behavior overridden in a protected method.

This change will involve making sure that everywhere the classes are used in 
contrib, core, demo and test, that dispose is called on them.  We don't want to 
neglect calling dispose in our own code.  For those with Visual Studio 2010 
Premium or higher, turning on Code Analysis in the project settings will flag a 
warning that Dispose needs to be called on a class, so you don't have to 
manually go searching for it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to