protected virtual void Dispose(bool disposing) { if (this._cb_free_cb != null) { if (disposing) { this._cb_free_cb(this._cb_data); } else { Efl.Eo.Globals.ThreadSafeFreeCbExec(this._cb_free_cb, this._cb_data); } this._cb_free_cb = null; this._cb_data = IntPtr.Zero; this._cb = null; } }
private static void call(System.IntPtr obj, System.IntPtr pd, IntPtr func_data, EFlThreadIOCallInternal func, EinaFreeCb func_free_cb) { Eina.Log.Debug("function efl_threadio_call was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); if (wrapper != null) { EFlThreadIOCallWrapper func_wrapper = new EFlThreadIOCallWrapper(func, func_data, func_free_cb); try { ((IThreadIOConcrete)wrapper).Call(func_wrapper.ManagedCb); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_threadio_call_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), func_data, func, func_free_cb); } }
internal EFlThreadIOCallWrapper(EFlThreadIOCallInternal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb) { this._cb = _cb; this._cb_data = _cb_data; this._cb_free_cb = _cb_free_cb; }