>Indeed you are correct. I need to really be careful when I utilize this data >structures and knowing their usage.
If that is so, I can think of various reasons why this takes so much memory: 1.) OBMol leaks memory when making a copy of itself. That would be a bug. 2.) The vector allocates a lot of reserve memory, because the size of each OBMol object is unknown. With pointers, the size of each vector entry is known even at compile time. 3.) OBMol.Clear() leaks memory. That would be a bug too. Anyway, glad that it helped. But it would be great to know the exact reason why. Maybe you can narrow the problem down a bit more? And with pointers, you now have to care about deletions from the vector yourself, since only the pointers are removed any you must release the OBMol object pointed to with delete. Otherwise you have created the next memory leak. Best regards, Ernst-Georg ------------------------------------------------------------------------------ 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