On Thu, Aug 12, 2010 at 5:41 PM, Geoffrey Hutchison <ge...@geoffhutchison.net> wrote: >> base class?) Then the original OBConversion gets destroyed. It tries >> to delete the source again as part of "delete pLineEndBuf" but it has >> already been deleted. If we had access to the destructor we could fix >> this. > > This makes sense. I think a good solution would be to use a smart pointer for > this -- it will detect the double-delete behavior. > > Chris, I think we already use this in a few places, so why don't we use the > shared_ptr type when available?
I've added an openbabel/shared_pointer.h for this purpose. > -Geoff > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel