>without being too much into C++: you allocate 'mol' on the stack, then push
it into the vector and clean it for re-usal afterwards. Is that allowed?

It is allowed, but of course i had a huge memory consumption. 


>Does the vector atomagically make a copy of 'mol'? 
Indeed you are correct. I need to really be careful when I utilize this data
structures and knowing their usage.

>What happens when you allocate 'mol' yourself and store the pointer to it
in the vector, like:
Actually that worked great. Memory consumption is 130MB, much much better.

Ernst-Georg, thank you very much, greatly appreciated.

-Andi

--
View this message in context: 
http://forums.openbabel.org/Memory-Leak-or-Usage-tp3409445p3418082.html
Sent from the openbabel-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to