Results 1 to 5 of 5

Thread: how to clear memory in QWebView ?

  1. #1
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default how to clear memory in QWebView ?

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to clear memory in QWebView ?

    Quote Originally Posted by tiaoweiliao View Post
    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,
    _

  3. #3
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to clear memory in QWebView ?

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to clear memory in QWebView ?

    Quote Originally Posted by tiaoweiliao View Post
    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,
    _

  5. #5
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to clear memory in QWebView ?

    thx , i see , you are right.

Similar Threads

  1. Replies: 2
    Last Post: 12th April 2016, 08:13
  2. Bad memory usage on QWebView I think
    By jiturra in forum Qt Programming
    Replies: 15
    Last Post: 21st January 2014, 20:35
  3. QTreewidget clear creates memory leaks
    By moh.gup@gmail.com in forum Qt Programming
    Replies: 6
    Last Post: 1st April 2011, 19:00
  4. How to clear history in QWebView
    By jimc1200 in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2009, 16:02
  5. How to clear shared memory?
    By THRESHE in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2008, 18:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.