[Mono-bugs] [Bug 50916][Wis] Changed - GC does not see objs put into an array as dead till array's method is out of scope

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 16 Nov 2003 11:17:47 -0500 (EST)

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 vargaz@freemail.hu.


--- shadow/50916	2003-11-13 12:33:26.000000000 -0500
+++ shadow/50916.tmp.28528	2003-11-16 11:17:47.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 50916
 Product: Mono/Runtime
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: REOPENED   
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Wishlist
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
@@ -85,6 +85,12 @@
 for (int j = 0; j < bar.Length; j++)
    bar [j] = new Foo ();
 It seems none of the Foo's would EVER be deallocated, which could be 
 a problem. Am going to play around w/ this some more later.
+------- Additional Comments From vargaz@freemail.hu  2003-11-16 11:17 -------
+This is in fact caused by a reference to the 'foofoo' array in the
+'blah' stack frame. If you put the allocation/free code in a separate
+function, and call that function from 'blah', all the array elements
+are freed. So the GC works correctly.