2010-04-02 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Fri, 2 Apr 2010 21:49:40 +0000 (21:49 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 2 Apr 2010 21:49:40 +0000 (21:49 -0000)
commit2b35d60a5a611a5c74c19710fdb30f44fe927cce
tree2e6e194dbd748a704e8512378205a537e9ddc049
parent0adf2b5eb6637b794ff2e278d64190137d88a217
2010-04-02  Miguel de Icaza  <miguel@novell.com>

        * SafeHandle.cs: Use refcount == -1 to indicate that the handle
        had been closed.

        The problem here is that we have no records of why the code that
        threw a ObjectDisposedException inside the do { } while block on
        DangerousAddRef was added.   It seems it was added in response to
        Close() methods being called and the need to throw that exception
        on further calls to ObjectDisposedException.

        Sadly, we have no test suites for that.

svn path=/trunk/mcs/; revision=154741
mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs
mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs