Visual leak detector and Qt

Dec 17, 2011 at 12:21 PM

Hi,

I try to analyze memory leaks in a Qt app. VLD detects memory leaks where there is not. Qt uses delayed memory deletion (QObject::deleteLater()), as well as parent-delete-its-children system, which does not seem to be recognized by VLD...

Is there an option for VLD, to output only ACTUAL memory leaks ? like the --show-reachable option in Valgrind

see http://stackoverflow.com/questions/1593717/is-anyone-using-valgrind-and-qt

 

thanks :) !

Jan 30, 2013 at 12:32 PM

same problem here!

Jan 30, 2013 at 5:48 PM

I have no idea about Qt, but I would rather allocate and release a ptr.

int main() {
  QObject * o = new QObject;
  delete o;
  return 0; 
}
Jan 30, 2013 at 9:21 PM
Hi,

You are right but as said in first post, Qt makes internal use of more sophisticated memory management systems. And this is not supported by VLD (anyway at the time I posted).
Jan 31, 2013 at 2:42 PM
But when QT is not releasing the memory after requesting it, I would excpect there exists a garbage collection function or similar. Otherwise I would never trust this product .