> while( not of file ) {
> if ( type is a vertex)
> mol.newAtom(...)
> if type is a bond)
> mol.newBond(...)
>
> if( type is end of molecule)
> break;
> }
>
> save the mol to container (ie. vector)
> mol.clear
> }
Without seeing real code, I can't say for sure, but I suspect with STL, you're
incurring a lot of extra memory overhead in not reserving/resizing vectors to
the size you want. (Actually, I see you posted to openbabel-discuss with this:
http://pastebin.com/HHy149fZ
My suggestion would be to monitor the memory usage, e.g.: for the vector<OBMol>
sizeof(v) + sizeof(T) * v.capacity(); // where T is the element type
You're also using Objective-C, so I can recommend Apple's Instruments.app,
which can monitor memory usage over time.
I'd be happy to help work with you to find your issues. I think the first one
is to try to reserve space in the vector before push_back a few hundred (or
thousand) times.
Hope that helps,
-Geoff
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel