http://bugzilla.novell.com/show_bug.cgi?id=568644
http://bugzilla.novell.com/show_bug.cgi?id=568644#c0 Summary: GC.Collect() does not collect WeakReferences Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: 32bit OS/Version: Windows 7 Status: NEW Severity: Major Priority: P5 - None Component: GC AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) [Test] public void WeakReference_IsGarbageCollected() { WeakReference weak = new WeakReference(new object()); Assert.IsTrue(weak.IsAlive); GC.Collect(); Thread.Sleep(TimeSpan.FromSeconds(10)); Assert.IsFalse(weak.IsAlive); } Reproducible: Always Steps to Reproduce: [Test] public void WeakReference_IsGarbageCollected() { WeakReference weak = new WeakReference(new object()); Assert.IsTrue(weak.IsAlive); GC.Collect(); Thread.Sleep(TimeSpan.FromSeconds(10)); Assert.IsFalse(weak.IsAlive); } Actual Results: weak.IsAlive is true Expected Results: weak.IsAlive should be false Test passes on MS implementation .NET Framework -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
