Page 1 of 1

Memory leak

PostPosted: Wed May 25, 2016 3:19 pm
by mdw
My favoured Memory Leak detector Dr. Memory points out that the following 2 allocations do never get deleted (I got dozens of errors):

\QxOrm\include\QxDao\QxSqlRelation.h
Code: Select all
127       m_lstSqlRelationPtr = new IxSqlRelationX();
128       m_lstDataMemberPtr = new QxCollection<QString, IxDataMember *>();

Couldn't we change the classes' destructor to add the two required deletes? Maybe I am missing something...
Code: Select all
101       virtual ~QxSqlRelation() { BOOST_STATIC_ASSERT(is_valid); }
=>
101       virtual ~QxSqlRelation() { BOOST_STATIC_ASSERT(is_valid); delete m_lstSqlRelationPtr; delete m_lstDataMemberPtr; }

Re: Memory leak

PostPosted: Wed May 25, 2016 4:01 pm
by qxorm
Hello,

Couldn't we change the classes' destructor to add the two required deletes?

Yes of course, I will fix it for the next version : thx to report that :)

Please note that these memory leak are in a singleton class, so you should not lose too much memory.