[Interest] Memory leak problem in a Qt App

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Fri Oct 30 17:43:52 CET 2015


> If someone is still pointing at a piece of memory then it
> is not a leak as defined by programs like Purify and Valgrind.
>

That's exactly what I meant by "That's not a leak in the classical sense"


>
> The most important thing to do is to understand how the program works.
> When does it allocate memory, when does it free it and then verify that
> the memory has in fact been freed.
>
> For your objects, put print statements in constructors and destructors.
> Match them up and look for missing destructor calls.
> At least them you will know which objects are not being freed.
>
> Also, use techniques like QScopedPointer to simplify memory
> management.
>
>
All this was done, especially in the QThread / QSocket part. But the app is
complex and something may have been left out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151030/707f9227/attachment.html>


More information about the Interest mailing list