Convert Runtime.Dispose to use GCHandle.
This commit is contained in:
Родитель
e2ee5a2710
Коммит
cff3617dd2
|
@ -188,7 +188,7 @@
|
|||
},
|
||||
|
||||
new XDelegate ("void", "void", "xamarin_dispose",
|
||||
"MonoObject *", "IntPtr", "mobj"
|
||||
"GCHandle->MonoObject*", "IntPtr", "mobj"
|
||||
) {
|
||||
WrappedManagedFunction = "Dispose",
|
||||
OnlyDynamicUsage = false,
|
||||
|
|
|
@ -712,9 +712,9 @@ namespace ObjCRuntime {
|
|||
return ObjectWrapper.Convert (GetNSObject (ptr, type, MissingCtorResolution.ThrowConstructor1NotFound, true, out created));
|
||||
}
|
||||
|
||||
static void Dispose (IntPtr mobj)
|
||||
static void Dispose (IntPtr gchandle)
|
||||
{
|
||||
((IDisposable) ObjectWrapper.Convert (mobj)).Dispose ();
|
||||
((IDisposable) GetGCHandleTarget (gchandle)).Dispose ();
|
||||
}
|
||||
|
||||
static bool IsParameterTransient (IntPtr info, int parameter)
|
||||
|
|
Загрузка…
Ссылка в новой задаче