[Mono-bugs] [Bug 28946][Nor] New - finalizers not chained

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
14 Aug 2002 17:11:19 -0000


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 lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=28946

--- shadow/28946	Wed Aug 14 13:11:19 2002
+++ shadow/28946.tmp.8565	Wed Aug 14 13:11:19 2002
@@ -0,0 +1,43 @@
+Bug#: 28946
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: finalizers not chained
+
+A finalizer should chain to the parents' finalizer in the finally
+block. Compile this sample with csc and mcs and compare the code
+in the Finalize() methods.
+using System;
+
+class Person
+{
+   ~Person()
+   {
+      Console.WriteLine("Person's object destroyed");
+   }
+}
+
+class Estudent:Person
+{
+   ~Estudent()
+   {
+      Console.WriteLine("Estudent's object destroyed");
+   }
+
+   public static void Main()
+   {
+      new Estudent();
+   }
+}