Re: Memory leaks



On 02/09/2011 04:39 PM, Bill C wrote:
My experience with valgrind and GTK is that it is easy to fix leaks.

Simply look for leaked memory that you allocated.  Then determine where 
you should have released it.  If it was not allocated by you its not 
your problem so ignore it.

Right.  And if your memory use isn't growing without bound over time
then it's not leaking.  Whether GTK+ frees it's own allocations or not,
your program's memory use is going to be the same.

Works for me, but I rely on minimal third party software and compile 
everything with debug enabled.  Dont see any sign of leakage problems in 
GTK, but I dont claim to use all its features; only the ones I need for 
my GUI code.

 From time to time I use valgrind to check for leaks with GTK2+ programs 
written in C and it is clear that there are  no leaks.  Have not tried 
GTK3.  Have not tried the C++ wrappers.

I would bet that Qt "leaks" in a similar manner to GTK+.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]