[Mono-bugs] [Bug 464537] New: GC.Collect() + WeakRefence behaviour differs from CLR behaviour.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 8 13:15:22 EST 2009


           Summary: GC.Collect() + WeakRefence behaviour differs from CLR
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: GC
        AssignedTo: lupus at novell.com
        ReportedBy: lucas.meijer at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

The following testcase passes on the clr, but fails on mono.
I don't know enough about GC's to say who is right and who is wrong, I just see
that it's different:

using System;

public class MonoTest
    public static int Main()
        var obj = new Version();
        WeakReference reference = new WeakReference(obj);
        obj = null;
        Console.WriteLine("reference.IsAlive: " + reference.IsAlive);

        if (reference.IsAlive) return 1; //fail

        return 0; //pass

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list