Пример #1
0
 void OnDestroy()
 {
     if (onDestroyFn != null)
     {
         onDestroyFn.call();
     }
     updateFn = null;
     if (lua != null)
     {
         lua.luaState.Close();
     }
     lua       = null;
     _instance = null;
     if (net != null)
     {
         net.Dispose();
     }
     net = null;
     if (ChatNet != null)
     {
         ChatNet.Dispose();
     }
     ChatNet = null;
     luacache.Clear();
 }
Пример #2
0
 static public int Dispose(IntPtr l)
 {
     try {
         LNet self = (LNet)checkSelf(l);
         self.Dispose();
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }