[Mono-bugs] [Bug 76330][Min] New - Some SWF classes don't use
GC.SuppressFinalize in their Dispose method
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Oct 4 16:16:42 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by sebastien at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76330
--- shadow/76330 2005-10-04 16:16:42.000000000 -0400
+++ shadow/76330.tmp.20409 2005-10-04 16:16:42.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 76330
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: sebastien at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Some SWF classes don't use GC.SuppressFinalize in their Dispose method
+
+Description of Problem:
+
+The three following classes implements IDisposable but don't call
+GC.SuppressFinalize. This reduce performance as the destructor will be
+called (even if it's no more required).
+
+* System.Resources.ResXResourceWriter
+* System.Windows.Forms.Cursor
+
+Steps to reproduce the problem:
+1. This was caught with a "pre-SVN" version of "gendarme"
+
+Actual Results:
+Gendarme
+Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+
+1. IDisposableWithDestructorWithoutSuppressFinalizeRule
+
+Problem: The type 'System.Resources.ResXResourceWriter' has a destructor
+and implements IDisposable. However it doesn't call
+System.GC.SuppressFinalize inside it's Dispose method.
+
+Solution: Add a call to GC.SuppressFinalize inside your Dispose method.
+
+More info available at: http://www.mono-project.com/
+
+2. IDisposableWithDestructorWithoutSuppressFinalizeRule
+
+Problem: The type 'System.Windows.Forms.Cursor' has a destructor and
+implements IDisposable. However it doesn't call System.GC.SuppressFinalize
+inside it's Dispose method.
+
+Solution: Add a call to GC.SuppressFinalize inside your Dispose method.
+
+More info available at: http://www.mono-project.com/
+
+Expected Results:
+* No warning from gendarme.
+
+How often does this happen?
+* Always
+
+Additional Information:
+* None.
More information about the mono-bugs
mailing list