[mono/monomac] ba5cfa2d: Fix disposing of platform types. Fixes #15375.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000141c09c924a-c975475e-ba3e-47fc-98fa-5e4731f49523-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monomac
Compare: https://github.com/mono/monomac/compare/4c4af435a802...ba5cfa2dc5a1
Commit: ba5cfa2dc5a1623d379e8b4f7aa1a3efdf8a82a8
Author: Rolf Bjarne Kvinge <[email protected]> (rolfbjarne)
Date: 2013-10-16 09:30:36 GMT
URL: https://github.com/mono/monomac/commit/ba5cfa2dc5a1623d379e8b4f7aa1a3efdf8a82a8
Fix disposing of platform types. Fixes #15375.
The handle field was getting cleared out before we were calling 'release'
on it, causing us to leak every instance of a platform type. Putting the
handle in a local variable before it's cleared out fixes this.
Changed paths:
M src/Foundation/NSObject.cs
Modified: src/Foundation/NSObject.cs
===================================================================
@@ -197,6 +197,7 @@ void CreateManagedRef (bool retain)
void ReleaseManagedRef ()
{
+ var handle = this.handle;
bool user_type = IsUserType (handle);
#if DEBUG_REF_COUNTING
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches