PDA

View Full Version : QImage destruction is not releasing memory.



node_ex
14th November 2008, 07:27
Hi,

I am loading a image of size 210kB into QImage variable. then application increases its virtual memory by 4000kb. While deleting the Qimage object, application releases 2000kb.

I am using Qt4. Is there any memory leak in QImage destruction in Qt 4.4.3.

Regards,
node_ex.

wysota
15th November 2008, 08:52
There is no memory leak, at least in Qt. If you're using Linux, don't treat the amounts of memory allocated reported by the system seriously - Linux tends to postpone deallocation of memory blocks in case the process asks for more memory shortly afterwards. In doubt use Valgrind or a similar tool to test your program.