Results 1 to 3 of 3

Thread: How to clear memory in QWebView , when call evaluateJavaScript()?

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

    Default How to clear memory in QWebView , when call evaluateJavaScript()?

    sorry,my English sucks , My first time to use qtcentre.

    I'm using Qt 5.3.1. windows 7 64bit.

    I had a web page to load , I need to be repeated calls evaluateJavaScript() , insert content to Web page.

    js function code is:
    function addMsg(){
    var sHtml='';
    sHtml += '<div><p>hello,world</p></div>'
    $('body').append(sHtml);
    }

    I through the timer calls evaluateJavaScript("addMsg()") , I found in memory increasing.

    How do I free the memory?

  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 , when call evaluateJavaScript()?

    You are appending to the HTML document, so the memory requirements to hold that document increase.

    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 call evaluateJavaScript()?

    thx.
    I see.

Similar Threads

  1. Replies: 1
    Last Post: 11th June 2015, 04:48
  2. Replies: 1
    Last Post: 14th March 2014, 22:40
  3. QWebView and evaluateJavaScript
    By hereiam in forum Qt Programming
    Replies: 3
    Last Post: 13th August 2013, 12:18
  4. Replies: 2
    Last Post: 16th June 2010, 15:42
  5. How to clear history in QWebView
    By jimc1200 in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2009, 16:02

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.