blueloveTH %!s(int64=3) %!d(string=hai) anos
pai
achega
efc7da7dc7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/memory.h

+ 1 - 1
src/memory.h

@@ -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);