lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Currens (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENENET-468) Implement the Dispose pattern properly in classes with Close
Date Fri, 13 Apr 2012 16:53:16 GMT

     [ https://issues.apache.org/jira/browse/LUCENENET-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christopher Currens resolved LUCENENET-468.
-------------------------------------------

    Resolution: Fixed

I'm closing this as fixed.  All types that implement Close now implement the Dispose pattern
properly.  However, not all references to Close() have been replaced with Dispose().  I don't
think that should block this issue from being close (or block a release).  It would be easiest
to remove these references when Close() is removed in the future.
                
> 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.2, Lucene.Net 2.9.4, Lucene.Net 2.9.4g, Lucene.Net
3.0.3
>         Environment: all
>            Reporter: Christopher Currens
>             Fix For: Lucene.Net 3.0.3
>
>          Time Spent: 1m
>  Remaining Estimate: 0h
>
> 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.
> These changes do not have to be breaking.  Instead, also make {{Close}} a public method
in the base class and have it call {{Dispose}}.  Mark it with the Obsolete attribute, so we
can remove it in later releases.

--
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

        

Mime
View raw message