Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to Reduce the Memory when a Tab is closed
Forum Updated to NodeBB v4.3 + New Features

How to Reduce the Memory when a Tab is closed

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • M Offline
    M Offline
    Macro
    wrote on 12 Nov 2012, 07:55 last edited by
    #1

    Hi..

    I am just trying to create a Browser kinda Application. In that i use a Tab Widget and a WebView for loading the url's. When I am having more number of new tabs my memory keeps on increasing and if i am closing the tabs one by one, the memory didn't reduces. The memory is same untill i close the last Tab. I tried to solve it with the delete method in my Tabs closable slot. Even after this, the memory is not reducing. Any suggestions please.

    Thanks & Regards

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Code_ReaQtor
      wrote on 12 Nov 2012, 08:26 last edited by
      #2

      There is another way, "deleteLater()":http://doc.qt.digia.com/qt/qobject.html#deleteLater. I am not sure if it is better to use.

      You may check if the object/s are deleted using the "destroyed() signal":http://doc.qt.digia.com/qt/qobject.html#destroyed

      Please visit my open-source projects at https://github.com/Code-ReaQtor.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgeyer
        wrote on 12 Nov 2012, 11:08 last edited by
        #3

        [quote author="Riz" date="1352706933"]Any suggestions please.[/quote]Use a proper tool to measure memory usage (valgrind, Purify or alike, not ps, the task manager or anything like that).

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Macro
          wrote on 12 Nov 2012, 11:20 last edited by
          #4

          [quote author="Code_ReaQtor" date="1352708812"]There is another way, "deleteLater()":http://doc.qt.digia.com/qt/qobject.html#deleteLater. I am not sure if it is better to use.

          You may check if the object/s are deleted using the "destroyed() signal":http://doc.qt.digia.com/qt/qobject.html#destroyed[/quote]

          Hi.. Already I tried using deleteLater() method. When i tried using that deleteLater() method, I can't able to close a particular tab. If I close any one of the Tab, the Whole Application is getting closed.. :-(

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Macro
            wrote on 12 Nov 2012, 11:24 last edited by
            #5

            [quote author="Lukas Geyer" date="1352718494"][quote author="Riz" date="1352706933"]Any suggestions please.[/quote]Use a proper tool to measure memory usage (valgrind, Purify or alike, not ps, the task manager or anything like that).[/quote]

            Thanks for your suggestion. I am trying with the Windows Task Manager only. Need to Check with some other memory leakage tools.

            1 Reply Last reply
            0

            1/5

            12 Nov 2012, 07:55

            • Login

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