private ObjectPool <BaseData> createRequestPool(int type) { ObjectPool <BaseData> pool = new ObjectPool <BaseData>(() => BytesControl.getRequestByID(type)); pool.setNeedClear(false); return(pool); }
public BaseData createRequest(int type) { ObjectPool <BaseData> pool = _requestDic.get(type); if (pool == null) { return(BytesControl.getRequestByID(type)); } return(pool.getOne()); }