コード例 #1
0
 public virtual void Dispose(bool disposeManagedResources)
 {
     if (!_Disposed)
     {
         if (disposeManagedResources)
         {
             if (_Reference != 0)
             {
                 _Interpreter.dispose(_Reference);
             }
         }
         _Interpreter = null;
         _Disposed    = true;
     }
 }
コード例 #2
0
        public virtual void Dispose(bool disposeManagedResources)
        {
            if (!_Disposed)
            {
                if (_Reference != 0 && _Interpreter != null)
                {
                    if (disposeManagedResources)
                    {
                        _Interpreter.dispose(_Reference);
                        _Reference = 0;
                    }
                    else if (_Interpreter.L != IntPtr.Zero)
                    {
                        _Reference = 0;
                    }
                }

                _Interpreter = null;
                _Disposed    = true;
            }
        }
コード例 #3
0
ファイル: LuaBase.cs プロジェクト: frozen4/UnityPlus
        protected virtual void Dispose(bool disposeManagedResources)
        {
            if (!_Disposed)
            {
                if (_Reference != 0 && _Interpreter != null)
                {
                    if (disposeManagedResources)
                    {
                        _Interpreter.dispose(_Reference);
                        _Reference = 0;
                    }
                    else if (_Interpreter.L != IntPtr.Zero)
                    {
                        LuaScriptMgr._refGCList.Enqueue(new LuaRef(_Interpreter.L, _Reference));
                        _Reference = 0;
                    }
                }

                _Interpreter = null;
                _Disposed    = true;
            }
        }
コード例 #4
0
        public virtual void Dispose(bool disposeManagedResources)
        {
            if (!_Disposed)
            {
                if (_Reference != 0 && _Interpreter != null)
                {
                    if (disposeManagedResources)
                    {
                        _Interpreter.dispose(_Reference);
                    }
                    else
                    {
                        LuaScriptMgr mgr = LuaScriptMgr.GetMgrFromLuaState(_Interpreter.L);
                        mgr.refGCList.Enqueue(_Reference);
                    }

                    _Reference = 0;
                }

                _Interpreter = null;
                _Disposed    = true;
            }
        }