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(); }
public void Dispose() { free(value); PoolData <T> .Free(value); }
public PD(System.Action <T> free) { value = PoolData <T> .Get(); this.free = free; }