Closed badcel closed 2 months ago
To fix a bug occurring in Pinta the ObjectHandle should dispose the object instance on the main thread:
ObjectHandle
public void Dispose() { var sourceFunc = new SourceFuncAsyncHandler(() => { Internal.Object.RemoveToggleRef(_handle, _callback, IntPtr.Zero); return false; }); MainContext.Invoke(MainContextUnownedHandle.NullHandle, sourceFunc.NativeCallback, IntPtr.Zero); }
To fix a bug occurring in Pinta the
ObjectHandle
should dispose the object instance on the main thread: