fix a bug

This commit is contained in:
blueloveTH 2023-02-22 22:57:25 +08:00
parent 08601671dc
commit efc7da7dc7

View File

@ -132,7 +132,7 @@ struct SmallArrayPool {
void dealloc(T* p, int n){ void dealloc(T* p, int n){
if(n == 0) return; if(n == 0) return;
if(n > __Bucket){ if(n > __Bucket || buckets[n].size() >= __BucketSize){
delete[] p; delete[] p;
}else{ }else{
buckets[n].push_back(p); buckets[n].push_back(p);