I'm new in this Qt programming. I am just trying to do a Browser application. In that i use a tab widget and a Webview for loading the url's. When am having more number of new tabs my memory keeps on increasing and if i am closing the tabs one by one, the memory didn't reduces. the memory is same till i close the last tab. i had tried with the delete method in my tabs closable slot. Even after this, the memory is not reducing. Any suggestions please...
Asked
Active
Viewed 206 times
0
-
2remember that memory may not decrase instantly after delete. – Kamil Klimek Jun 12 '12 at 13:39
-
1And also remember that C++ has its own memory management techniques. Also the operating system may reserve the deleted memory for the process and not make it free. Also there is no tool that shows memory usage of a program accurately. – Hossein Jun 15 '12 at 07:31
1 Answers
1
Check if your slot gets in fact executed (set a breakpoint or add something like
qDebug() << "hello!";
-- don't forget to#include <QtCore/QDebug>
, of course).The heap allocator code that comes as part of your C/C++ runtime library probably doesn't release the memory back to the operating system. You'd need to use platform-specific ways of asking the heap allocator how much memory it did, in fact, allocate. Looking at some OS process browser won't tell you what's going on, not at all.

Kuba hasn't forgotten Monica
- 95,931
- 16
- 151
- 313