开发者

QPixmap possible leak seen on Activity Monitor Mac OS X

开发者 https://www.devze.com 2023-02-24 17:03 出处:网络
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\");

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

精彩评论

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

关注公众号