c++ - Memory leak with shared pointers? -


i have structure of code :

class base {     //maps, sets on stack     //maps, set shared pointers };  int main() {      for(int i=0;i<10;i++)      {          try          {              boost::shared_ptr<base> b(new base(....));              b.func()          }          catch exception          {              print exception          }             //some more functionality      } } 

in case, func throws exception (assume always), getting continuous increase in memory leak of ~15-16 mb each iteration. can point out may helpful?

is because of throwing exception? have checked code, don't see fishy.


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -