QPrinter reporting (false positive?) memory leaks
Unsolved
General and Desktop
-
Using windows, visual studio 2022, a minimal program like:
int WINAPI CALLBACK WinMain( HINSTANCE hInstance , HINSTANCE hPrevInstance , LPSTR lpCmdLine , int nShowCmd ) { _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); QApplication app( __argc , __argv ); QPrinter printer( QPrinter::HighResolution ); return 0; }
reports several leaks:
{2340} normal block at 0x0000022AF0341100, 66 bytes long. Data: < > 01 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 {2237} normal block at 0x0000022AEE055BA0, 16 bytes long. Data: < > 01 00 00 00 FF FF FF FF CD CD CD CD CD CD CD CD {2236} normal block at 0x0000022AEE02A0E0, 120 bytes long. Data: <hH ` * > 68 48 C8 12 FB 7F 00 00 F0 60 05 EE 2A 02 00 00 {2235} normal block at 0x0000022AEE0560F0, 16 bytes long. Data: <x @" * > 78 09 40 22 FB 7F 00 00 E0 A0 02 EE 2A 02 00 00 {192} normal block at 0x0000022AEDFE08B0, 216 bytes long. Data: < m t * > D0 6D D6 12 FB 7F 00 00 C0 74 00 EE 2A 02 00 00 {191} normal block at 0x0000022AEE0074C0, 16 bytes long. Data: < m * > F0 6D D6 12 FB 7F 00 00 B0 08 FE ED 2A 02 00 00 {190} normal block at 0x0000022AEDFE6040, 152 bytes long. Data: < > 01 00 00 00 00 00 00 00 00 00 00 00 CD CD CD CD
I tried for a bit to track those down, but it's pretty deep in the Qt code and I kind of give up.
These do not multiply when creating additional QPrinter objects, so it seems they are allocated once in some globals. It doesn't sound like a huge problem, but with leak reporter going off after every run it's becoming extremely easy to miss any actual leaks.
Can I do something about it? To force clean QPrinter related globals or something along those lines?
Thanks!