Memory leak

Forum for posting problems using QxOrm library

Memory leak

Postby mdw » Wed May 25, 2016 3:19 pm

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; }
mdw
 
Posts: 34
Joined: Mon Feb 15, 2016 2:45 pm

Re: Memory leak

Postby qxorm » Wed May 25, 2016 4:01 pm

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.
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 9 guests

cron