[Qt-interest] Memory issues with painter->drawText()
shiva sitamraju
shivaenigma at gmail.com
Tue May 19 10:46:24 CEST 2009
Hi everyone,
Here is my issue. Whenever i call painter->drawText (with some newlines in
the text) the resident memory usage shoots up by around 10MB. Also to add to
the problems, the memory is not released when I close the widget.
I am attaching the code to test this problem. I create a widget with a
pushbutton and on clicking the button I set a flag, due to which text is
drawn in paintEvent.
After the paintEvent starts painting text the resident memory (res shown in
top) shoots up by around 10MB which is not released even after I close the
widget. Virtual memory usage also shoots up by a large number(around 100MB)
and is not reclaimed.
I would be glad if someone can throw some insight on why this is happening.
Thanks
-Shiva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/e08924b6/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.cpp
Type: text/x-c++src
Size: 656 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/e08924b6/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 291 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/e08924b6/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainwindow.h
Type: text/x-chdr
Size: 369 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/e08924b6/attachment-0002.bin
More information about the Qt-interest-old
mailing list