PDA

View Full Version : how to clear memory in QWebView ?



tiaoweiliao
5th May 2016, 07:26
i use QWebView , call evaluateJavaScript() insert content to Web page. memory increasing .

I want to achieve "clear" function. free memory.

How did this? :)

i try call QWebSettings::globalSettings()->clearMemoryCaches(); and reload new Empty page.

but i open Task Manager , memory usage no change.

i use Qt 5.3.1 mingw , win7 64bit.

anda_skoa
5th May 2016, 10:38
but i open Task Manager , memory usage no change.

That doesn't really matter, the operating system might not have reclaimed the memory, etc.
Does the memory usage increase when you add again after loading an empty page?

Cheers,
_

tiaoweiliao
6th May 2016, 04:22
when I add again after loading an empty page , memory not reduce.
Task manager shows programs use a lot of memory , this is not good.
Please excuse my english:)

anda_skoa
6th May 2016, 10:45
when I add again after loading an empty page , memory not reduce.

I asked if it increases immediately again.
If it does not, then the memory is just not reclaimed but reused.

Cheers,
_

tiaoweiliao
9th May 2016, 03:03
thx , i see , you are right.