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. Memory leak debuging
QtWS25 Last Chance

Memory leak debuging

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 597 Views
  • 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.
  • J Offline
    J Offline
    JoSchn
    wrote on last edited by
    #1

    Hi,
    I am new here. I am working on a Qt project version(QT5.6.3).

    It is a application for outputing text and graphical things.
    The main problem is: If the application runs for some hours, the memory increases, about 9MB per hour!
    Anybody ideas how to detect this problem, or any useful tools for detecting such problems?
    Thank you.

    JonBJ 1 Reply Last reply
    0
    • J JoSchn

      Hi,
      I am new here. I am working on a Qt project version(QT5.6.3).

      It is a application for outputing text and graphical things.
      The main problem is: If the application runs for some hours, the memory increases, about 9MB per hour!
      Anybody ideas how to detect this problem, or any useful tools for detecting such problems?
      Thank you.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @JoSchn
      Hello and welcome.

      Try valgrind, for which support is built into Qt Creator.

      Unless you are under Windows, where it's not available. And you don't mention compiler. Without knowing either of which nobody can advise you.

      1 Reply Last reply
      1
      • J Offline
        J Offline
        JoSchn
        wrote on last edited by
        #3

        Oh, sorry.
        Yes, Windows and VisualStudio 2013 Compiler

        JonBJ 1 Reply Last reply
        0
        • J JoSchn

          Oh, sorry.
          Yes, Windows and VisualStudio 2013 Compiler

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @JoSchn
          Then I would look into the memory analysis tools which I believe are supplied with VS 2013.

          You could try a valgrind substitute like e.g. Valgrind for Windows (which is Deleaker), which says it works for VS, but whether for VS 2013 I don't know. My first thought would be to try whatever MS supply in VS 2013 for this.

          1 Reply Last reply
          0
          • cristian-adamC Online
            cristian-adamC Online
            cristian-adam
            wrote on last edited by
            #5

            Have a look at Qt Creator's Detecting Memory Leaks with Heob.

            JonBJ 1 Reply Last reply
            1
            • cristian-adamC cristian-adam

              Have a look at Qt Creator's Detecting Memory Leaks with Heob.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @cristian-adam
              Hi. That github repo only mentions MinGW and MSVC. Neither it nor the Qt docs page say anything about platforms. Is it Linux too?

              1 Reply Last reply
              0
              • cristian-adamC Online
                cristian-adamC Online
                cristian-adam
                wrote on last edited by
                #7

                It looks like a Windows only solution, which is fine since Valgrind is available for Unix.

                JonBJ 1 Reply Last reply
                0
                • cristian-adamC cristian-adam

                  It looks like a Windows only solution, which is fine since Valgrind is available for Unix.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @cristian-adam
                  Sure, i was just asking because I am a Linux Qt user and had not heard of it! :) Fine for the OP here!

                  1 Reply Last reply
                  0
                  • Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    MTuner and Visual Leak Detector are both excellent tools that helped me in the past with leak detection.
                    Also, if you can run your app under the debugger Visual Studio has a built in memory profiler. You can take snapshots of your process memory before and after some period of time and see allocations with callstacks made in between. I don't think it was available in VS2013, but you can use a never version of the IDE only for debugging.

                    1 Reply Last reply
                    2
                    • cristian-adamC Online
                      cristian-adamC Online
                      cristian-adam
                      wrote on last edited by
                      #10

                      Besides Heob you can use Find memory leaks with the CRT library which is specific to MSVC, and the cross platform version at A Cross-Platform Memory Leak Detector.

                      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