QWebView memory deallocation



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.