void SafeRelease(ref LuaEvent luaEvent) { if (luaEvent != null) { luaEvent.Dispose(); luaEvent = null; } }