Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QWebView memory deallocation
Forum Updated to NodeBB v4.3 + New Features

QWebView memory deallocation

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 894 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kdkdkd
    wrote on last edited by
    #1

    Hello all!

    I'm building application which constantly creates a deletes QWebView object. After some time the memory consumption is growing significantly. I build the minimal example, which demonstrates the problem.

    @ QList<QWebView *>views;

    for(int i = 0;i<500;i++)
    {
        QWebView *view = new QWebView();
        view->setHtml("Test");
        views.append(view);
    }
    
    foreach(QWebView *view,views)
    {
        delete view;
    }
    views.clear();@
    

    If I run this function in a loop memory allocated by programm gets evenly growing. If I replace QWebView with QPlainTextEdit or other widget - problem disappears. I also tried functions like clearMemoryCaches, setObjectCacheCapacities, deleting page. Still no luck. Is there is a correct way how resources from QWebView can be deallocated?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved