Qt Memory Error ?
-
Windows 8.1 64Bit + Qt Creator 5.4.0 development environment.
Create a ProxyWidget on the QGraphicsView.
Save function & load function developed by yourself.
Save and Recall Function If you execute it repeatedly, the following error occurs.
Is your computer running out of memory?
-
Windows 8.1 64Bit + Qt Creator 5.4.0 development environment.
Create a ProxyWidget on the QGraphicsView.
Save function & load function developed by yourself.
Save and Recall Function If you execute it repeatedly, the following error occurs.
Is your computer running out of memory?
@pada_ said in Qt Memory Error ?:
Save function & load function developed by yourself.
chances are high the memory leak happens here
-
Hi
It seems you leak GDI resources so it asserts on a HDC so
i would check all places where you handle images.
the assert seems to come fromstatic inline HDC createDC() { HDC display_dc = GetDC(0); HDC hdc = CreateCompatibleDC(display_dc); ReleaseDC(0, display_dc); Q_ASSERT(hdc); return hdc; }
So make sure you are not newing scenes or the view over and over when
loading. -
Hi
It seems you leak GDI resources so it asserts on a HDC so
i would check all places where you handle images.
the assert seems to come fromstatic inline HDC createDC() { HDC display_dc = GetDC(0); HDC hdc = CreateCompatibleDC(display_dc); ReleaseDC(0, display_dc); Q_ASSERT(hdc); return hdc; }
So make sure you are not newing scenes or the view over and over when
loading. -
@pada_ said in Qt Memory Error ?:
Shouldn't it cause thread repainting of the widget?
You must not paint on a widget outside the main thread.
-
Hi
You really need to show your code for
Save and Recall Function code if we should have a chance to guess
why your app seems to eat GDI resources and/or leak memory.