Is anyone using valgrind and Qt?

后端 未结 3 1312
醉酒成梦
醉酒成梦 2020-12-11 01:15

I am trying to debug a large application build using Qt/C++ and valgrind is reporting a lot of memory leak from internal Qt stuff. Could anyone share a proper valgrind suppr

3条回答
  •  隐瞒了意图╮
    2020-12-11 01:31

    still reachable: 744 bytes in 7 blocks
    

    If you release QObject o? Do still have the same result?

    Update: Just to clarify, this memory will be released by the os when you close the application (so it is not a leak).

    However for you own sake it is always good to write a destructor that releases the memory, and it always feels nice to know that you have control over what is allocated and deallocated. (so you don't end up with real memory leaks...)

提交回复
热议问题