QPixmap possible leak seen on Activity Monitor Mac OS X

386 Views Asked by At

I have a problem with QPixmap in Qt 4.7 on snow leopard 10.6.7 if it helps.

QPixmap *pix = new QPixmap("image.png");
delete pix;

Still, Activity Monitor shows me that the Real Memory usage for my application increases ... As the QPixmap was never deleted. I tested it by iterating the process and create/delete 50 pixmaps in a for loop.

Is it a Qt leak or is activity monitor crazy ?

Thank you !

1

There are 1 best solutions below

1
On

What tool did you use to check this? Basically, you shouldnt use the system monitor to check memory leaks, especially for a single line allocation, there are dedicated tools for that.

Use Valgrind