private ObjectPool <BaseData> createDataPool(int type) { ObjectPool <BaseData> pool = new ObjectPool <BaseData>(() => BytesControl.getDataByID(type)); pool.setNeedClear(false); return(pool); }
public BaseData createData(int type) { ObjectPool <BaseData> pool = _dataDic.get(type); if (pool == null) { return(BytesControl.getDataByID(type)); } return(pool.getOne()); }