On 16/06/2011 17:35, andi wrote:
> Hello Developers,
>
> I'm trying to set some generic data (OBPairData) on a per atom basis and to
> ensure im being memory efficient I was wondering how the generic data of
> that is atom is begin deleted?
>
> I'd like to think that once the molecule or the atom itself gets deleted
> then the generic data gets deleted as well, but from my finding I don't see
> how the generic data gets deleted.
>
> I looked in the source, and the Destructor for the atom has the generic data
> deletion code commented out. The only thing there is the residue.
>
OBMol, OBAtom, OBBond, etc. are derived from OBBase and its destructor 
(in base.h) is intended to delete any attached OBGenericData objects. 
Years ago I think each class handled its own, and the commented out code 
is a remnant of that. If you find this is not working properly post 
again. Thanks for the detailed interest.

Chris

> Below is a link with the following snippet code for OBMol, OBAtom, OBResidue
> destructor calls:
> http://pastebin.com/Rekmp8L5



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to