public void Destroy() { if (luaState != null) { if (UpdateEvent != null) { UpdateEvent.Dispose(); UpdateEvent = null; } if (LateUpdateEvent != null) { LateUpdateEvent.Dispose(); LateUpdateEvent = null; } if (FixedUpdateEvent != null) { FixedUpdateEvent.Dispose(); FixedUpdateEvent = null; } luaState = null; } }
public void Destroy() { if (luaState != null) { SafeRelease(ref updateFunc); SafeRelease(ref lateUpdateFunc); SafeRelease(ref fixedUpdateFunc); if (UpdateEvent != null) { UpdateEvent.Dispose(); UpdateEvent = null; } if (LateUpdateEvent != null) { LateUpdateEvent.Dispose(); LateUpdateEvent = null; } if (FixedUpdateEvent != null) { FixedUpdateEvent.Dispose(); FixedUpdateEvent = null; } luaState = null; } }
void OnApplicationQuit() { if (luaState != null) { SafeRelease(ref updateFunc); SafeRelease(ref lateUpdateFunc); SafeRelease(ref fixedUpdateFunc); SafeRelease(ref levelLoaded); if (UpdateEvent != null) { UpdateEvent.Dispose(); UpdateEvent = null; } if (LateUpdateEvent != null) { LateUpdateEvent.Dispose(); LateUpdateEvent = null; } if (FixedUpdateEvent != null) { FixedUpdateEvent.Dispose(); FixedUpdateEvent = null; } luaState.Dispose(); luaState = null; Instance = null; } }
public void Close() { SafeRelease(ref updateFunc); SafeRelease(ref lateUpdateFunc); SafeRelease(ref fixedUpdateFunc); if (UpdateEvent != null) { UpdateEvent.Dispose(); UpdateEvent = null; } if (LateUpdateEvent != null) { LateUpdateEvent.Dispose(); LateUpdateEvent = null; } if (FixedUpdateEvent != null) { FixedUpdateEvent.Dispose(); FixedUpdateEvent = null; } lua.Dispose(); lua = null; loader = null; }
public void Close() { SafeRelease(ref updateFunc); SafeRelease(ref lateUpdateFunc); SafeRelease(ref fixedUpdateFunc); if (UpdateEvent != null) { UpdateEvent.Dispose(); UpdateEvent = null; } if (LateUpdateEvent != null) { LateUpdateEvent.Dispose(); LateUpdateEvent = null; } if (FixedUpdateEvent != null) { FixedUpdateEvent.Dispose(); FixedUpdateEvent = null; } _luaState.Dispose(); _luaState = null; }