开发者

QPixmap possible leak seen on Activity Monitor Mac OS X

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 a开发者_高级运维nd create/delete 50 pixmaps in a for loop.

Is it a Qt leak or is activity monitor crazy ?

Thank you !


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜