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. Memory Leak y WebKit 4.5.3 (especially asked to Benjamin Poulain)
Forum Updated to NodeBB v4.3 + New Features

Memory Leak y WebKit 4.5.3 (especially asked to Benjamin Poulain)

Scheduled Pinned Locked Moved Qt WebKit
7 Posts 4 Posters 5.4k 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.
  • D Offline
    D Offline
    DavidGOrtega
    wrote on last edited by
    #1

    I was asking this to Benjamin directly but I suppose that doing this here would be better for everybody.

    The main thing is that everytime that I load a page with webkit the memory is leaked no matter how I try to remove everything.

    I have put this configuration:

    @this->_webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
    this->_webView->settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, false);
    this->_webView->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, false);
    this->_webView->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
    this->_webView->settings()->setMaximumPagesInCache(0);
    this->_webView->settings()->setObjectCacheCapacities(0, 0, 0);

    this->_webView->history()->setMaximumItemCount(0);@

    and this in the destructor

    @this->_webView->history()->clear();
    delete this->_webView;@

    but the memory leak is still there, I have seen many post on this but I don't really know if it has been fixed... It's supposed that the bug comes rendering the font but I have noted that the memory loose is so significant...

    Do you know where is the bug to fix it and recompile the dll?

    Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      First, how about using the latest Qt? Second, how do you measure the leak? Valgrind?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        benjamin.poulain
        wrote on last edited by
        #3

        There are way too many things that have changed between 4.5 and 4.7 to know where it has been fixed.

        Have you tried valgrind's massif to find where the leak comes from?

        You could also bisect webkit to find which patch fixed the leak.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DavidGOrtega
          wrote on last edited by
          #4

          [quote author="peppe" date="1294414076"]First, how about using the latest Qt? Second, how do you measure the leak? Valgrind?[/quote]

          I normally use valgring but it's pretty easy to note this bug since each load eats near a 1 mb and all my code is perfectly garbage collected ;)

          Unit testing all my classes the only loose comes from the one that uses QWebPage after performing a load method.

          I'm not using the last version since It actually breaks my code...

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DavidGOrtega
            wrote on last edited by
            #5

            In 4.6 there should be a similar problem

            http://stackoverflow.com/questions/1903193/4-6-qwebview-memory-leaks

            So if not solved in 4.7 the bug should be there...

            just have a look to this

            http://tiny.cc/55y3v

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DavidGOrtega
              wrote on last edited by
              #6

              Qt 4.7 has less memory leak than 4.5.3 but still is loosing a lot of memory!!
              Since I know thats hard to believe I’m preparing a demo…

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TTGator
                wrote on last edited by
                #7

                Hey David, I think I'm having the same problem. Did you ever figure anything out regarding this?

                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