Beispiel #1
0
        static public void Cleanup()
        {
#if UNITY_EDITOR
            Debug.Log("CustomDataStruct Cleanup!");
#endif
            BetterDelegate.Cleanup();
            BetterStringBuilder.Cleanup();
            ValueObject.Cleanup();
            ObjPoolBase.Cleanup();
#if UNITY_EDITOR
            MemoryLeakDetecter.Cleanup();
#endif
        }
Beispiel #2
0
        public void Release()
        {
            if (mTypeObjHolder != null && mTypeObj != null)
            {
                mTypeObjHolder.Release(mTypeObj);
            }
            mTypeObj       = null;
            mTypeObjHolder = null;
            lock (mValueObjPool)
            {
                mValueObjPool.Enqueue(this);
#if UNITY_EDITOR
                detecter.DecreseInstance();
                detecter.SetPooledObjectCount(mValueObjPool.Count);
#endif
            }
        }
Beispiel #3
0
 protected static void AddInstance(ObjPoolBase instance)
 {
     instanceList.Add(instance);
 }