2013年9月18日星期三

[Android] Qt memory leak problem

Software to run a long time a lot of problems . .
run 17 hours a scratch more than the starting time of the 800m temporary memory . . Scary ah

feeling is the problem here .
I use QListWidget inside customized styles
inside new QLabel there is a lot of 100 * 100 thumbnails a QProgressBar
There 8w one of the past . . However, I control which shows only 1000 . .

When there is more than 1000 entries
I would first like to delete it.
delete ui.listWidget-> takeItem (0);

wrote a small program to test the next two label a progressbar. . Software starts taking up 3mb. . I created 1000 . . Occupy 12mb, then also delete all occupied 9mb.
does not completely release ah ? ? do the math. . 1000 after the release of more than occupied 6mb. . That one is almost 6kb. .
so my 8w article also takes up 468mb. .

I do not know how to solve this . . Great God to guide the next . .
------ Solution ---------------------------------------- ----
with gif animation made ​​a 70M memory running up directly risen to a G, really can not figure ~ ~
------ Solution --------- -----------------------------------
http://qt-project.org/doc/qt-4.8/stylesheet-examples.html
- ----- eference ---------------------------------------
seeking top ah huh
------ eference ------------------ ---------------------
sent the wrong
------ eference ------------- --------------------------


I loaded a 10mb represents the png. More memory occupied 70-80mb. .
So you that almost

Pictures release in memory to take up more memory . .

没有评论:

发表评论