Pregunta

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...

¿Fue útil?

Solución

  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).

  2. 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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top