Results 1 to 4 of 4

Thread: Need help on memory management on an application using QWebView

  1. #1
    Join Date
    Jun 2011
    Posts
    14
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Need help on memory management on an application using QWebView

    Hi,

    I am developing an application on a target device. One module of the application involves the web browser which has been implemented using QWebView. Now the browser requires to be able to navigate back to at least 30 pages. So i keep a history of the web pages visited.
    The problem is that after loading 5-6 webpages, the application dies because of low memory.
    I searched the net and tried using
    Qt Code:
    1. QAbstractNetworkCache::Clear()
    2. QAbstractNetworkCache::remove()
    3. QWebSettings::clearIconDatabase ()
    4. QWebSettings::clearIconDatabase ()
    To copy to clipboard, switch view to plain text mode 

    These helped quite a bit, but the application still dies after loading approx 12-13 pages.
    Since the target device has limited memory(40 MB) in our case, I need to free memory as soon as I am on threshold of running out of memory. Can somebody help me how can I free some memory and/or manage it better?

    Thanks.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Need help on memory management on an application using QWebView

    Did you use these to limit the history...

    Qt Code:
    1. QWebHistory * QWebPage::history (); // get the history instance
    2. void QWebHistory::setMaximumItemCount ( int count ) // set maximum size
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jun 2011
    Posts
    14
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Need help on memory management on an application using QWebView

    yes..I did limit history size to 30.

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Need help on memory management on an application using QWebView

    Just a thought: May be unload all the not required modules objects expect QWebView, (which you can created later after QWebView is done)..

Similar Threads

  1. Memory management in Qt?
    By wookoon in forum Qt Programming
    Replies: 7
    Last Post: 6th November 2010, 18:20
  2. QStackedWidget and memory management
    By martinn in forum Newbie
    Replies: 14
    Last Post: 8th April 2010, 00:14
  3. Memory Management Reg
    By BalaQT in forum Newbie
    Replies: 10
    Last Post: 4th February 2010, 12:43
  4. Memory management
    By cyberboy in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2008, 20:48
  5. Memory management in QT
    By Gayathri in forum Qt Programming
    Replies: 1
    Last Post: 17th November 2006, 07:21

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.