On Wed, Oct 13, 2010 at 2:39 PM, Noel O'Boyle <baoille...@gmail.com> wrote:
> Hi Tim,
>
> VLD is finding a memory leak under MSVC when using FindAutomorphisms as 
> follows:
>
>  Call Stack:
>    c:\program files (x86)\microsoft visual studio
> 9.0\vc\include\xmemory (43): std::_Allocate<unsigned int>
>    c:\program files (x86)\microsoft visual studio
> 9.0\vc\include\xmemory (145): std::allocator<unsigned int>::allocate
>    c:\program files (x86)\microsoft visual studio
> 9.0\vc\include\vector (1110): std::vector<unsigned
> int,std::allocator<unsigned int> >::_Buy
>    c:\program files (x86)\microsoft visual studio
> 9.0\vc\include\vector (501): std::vector<unsigned
> int,std::allocator<unsigned int> >::vector<unsigned
> int,std::allocator<unsigned int> >
>    c:\tools\openbabel\newrepo\src\isomorphism.cpp (571):
> OpenBabel::OBAutomorphismQueryAtom::OBAutomorphismQueryAtom
>    c:\tools\openbabel\newrepo\src\isomorphism.cpp (594):
> OpenBabel::CompileAutomorphismQuery
>    c:\tools\openbabel\newrepo\src\isomorphism.cpp (662):
> OpenBabel::FindAutomorphisms
>    c:\tools\openbabel\newrepo\src\isomorphism.cpp (623):
> OpenBabel::FindAutomorphisms
>
> Could it be that vector<unsigned int> symclasses(_symclass) is
> allocated but never deallocated? Don't ask me why?? Some sort of weak
> reference keeping it alive?

The vector is never deallocated because the OBAutomorphismQueryAtom
objects are deleted using pointers to OBQueryAtom objects. I have
added a virtual destructor to OBQueryAtom which means that the
OBAuto...Atom default destructor is now called.

Tim

> I see the same problem in the nightly dynamic analysis
> (http://my.cdash.org/viewDynamicAnalysisFile.php?id=280143) :
> "256 bytes in 8 blocks are definitely lost in loss record 13 of 32"
>
> It's not a lot but on a small test file (50 molecules), I have this
> same problem 800 times. Any ideas?
>
> - Noel
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to