public override void SysFinalize() { MyLuaSrv.Instance.Dispose(); if (worker != null) { worker.Dispose(); } base.SysFinalize(); }
static public int Dispose(IntPtr l) { try { LuaWorker self = (LuaWorker)checkSelf(l); self.Dispose(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
protected override void OnDestroy() { CallLuaMethod("OnDestroy"); _worker.Dispose(); }