[Mono-bugs] [Bug 572043] New: Singleton COM object are not reference counted correctly in mono

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 19 15:40:36 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=572043

http://bugzilla.novell.com/show_bug.cgi?id=572043#c0


           Summary: Singleton COM object are not reference counted
                    correctly in mono
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.5
(KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5


Sample code:

var c1 = new SingletonComObject()
var c2 = new SingletonComObject()
Console.WriteLine(Marshal.ReleaseComObject(c1));
Console.WriteLine(Marshal.ReleaseComObject(c2));


Since the second call to new SingletonComObject should return the same
underlying COM object as the first call, the Com object should have a ref count
of 2.


using:
Mono JIT compiler version 2.7 /trunk/mono r147501

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
0
-1

Expected Results:  
1
0

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


More information about the mono-bugs mailing list