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); } else if (bd is ISpriteData) { PoolData <ISpriteData> .Free((ISpriteData)bd); } } DataList.Clear(); }
public void Dispose() { free(value); PoolData <T> .Free(value); }