public static void ReleaseWrapper(IntPtr ptr) { if (ptr == IntPtr.Zero) { return; } ManagedValue val = FromHandle(ptr); val.Unref(); }
static void Free(IntPtr ptr) { try { if (ptr == IntPtr.Zero) { return; } ManagedValue val = FromHandle(ptr); val.Unref(); } catch (Exception e) { ExceptionManager.RaiseUnhandledException(e, false); } }