blueloveTH hace 3 años
padre
commit
efc7da7dc7
Se han modificado 1 ficheros con 1 adiciones y 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){
         if(n == 0) return;
-        if(n > __Bucket){
+        if(n > __Bucket || buckets[n].size() >= __BucketSize){
             delete[] p;
         }else{
             buckets[n].push_back(p);