示例#1
0
        public void Release()
        {
            materials.Clear();

            BaseData bd = null;

            for (int i = 0; i < DataList.Count; ++i)
            {
                bd = DataList[i];
                bd.Release();
                if (bd is TextData)
                {
                    PoolData <TextData> .Free((TextData)bd);
                }
                else if (bd is SpriteData)
                {
                    PoolData <SpriteData> .Free((SpriteData)bd);
                }
            }

            DataList.Clear();
        }
示例#2
0
 public void Dispose()
 {
     free(value);
     PoolData <T> .Free(value);
 }
示例#3
0
        public PD(System.Action <T> free)
        {
            value = PoolData <T> .Get();

            this.free = free;
        }