Browse Source

Revert "Update safestl.h"

This reverts commit 66cf67668c58c6127fbd296d477fb916ace1d92f.
blueloveTH 3 years ago
parent
commit
52df3a2f67
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/safestl.h

+ 1 - 4
src/safestl.h

@@ -51,13 +51,10 @@ namespace pkpy {
                 this->_size = 0;
                 this->_size = 0;
                 return;
                 return;
             }
             }
-            if(n >= kMaxPoolSize){
+            if(n >= kMaxPoolSize || _args_pool[n].empty()){
                 this->_args = new PyVar[n];
                 this->_args = new PyVar[n];
                 this->_size = n;
                 this->_size = n;
             }else{
             }else{
-                if(_args_pool[n].empty()){
-                    for(int i=0; i<8; i++) _args_pool[n].push_back(new PyVar[n]);
-                }
                 this->_args = _args_pool[n].back();
                 this->_args = _args_pool[n].back();
                 this->_size = n;
                 this->_size = n;
                 _args_pool[n].pop_back();
                 _args_pool[n].pop_back();