Commit Graph
2 Commits
Author SHA1 Message Date
Miguel de Icaza 2b35d60a5a 2010-04-02 Miguel de Icaza <[email protected]>
* 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
2010-04-02 21:49:40 +00:00
Miguel de Icaza 24f79898c5 2006-12-11 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Fix a handful of bugs, and add tests for them.
	Only release the handle if its owned by us.  Also throw
	ObjectDisposedException's


svn path=/trunk/mcs/; revision=69378
2006-12-12 00:40:52 +00:00