Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How can we use Valgrind Tools of Qt creator to check memory leaks in Windows and MAC?
QtWS25 Last Chance

How can we use Valgrind Tools of Qt creator to check memory leaks in Windows and MAC?

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 5 Posters 20.3k 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.
  • P Offline
    P Offline
    pratik041
    wrote on last edited by
    #1

    I have tried in MAC but i am getting the error
    "valgrind tools could not be started: No such file or directory".

    Pratik Agrawal

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      Valgrind is not available for Windows. And it supports only Mac OS X 10.6 and 10.7.
      Which version of Mac OS X do you have?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pratik041
        wrote on last edited by
        #3

        [quote author="p-himik" date="1332388165"]Valgrind is not available for Windows. And it supports only Mac OS X 10.6 and 10.7.
        Which version of Mac OS X do you have?[/quote]

        so how can we analyze code in windows?

        Pratik Agrawal

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p-himik
          wrote on last edited by
          #4

          There are some tools. Some of them are commercial. Try to search in the web.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lgeyer
            wrote on last edited by
            #5

            "Profiling and Memory Checking Tools":http://qt-project.org/wiki/Profiling-and-Memory-Checking-Tools

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pratik041
              wrote on last edited by
              #6

              [quote author="Lukas Geyer" date="1332401205"]"Profiling and Memory Checking Tools":http://qt-project.org/wiki/Profiling-and-Memory-Checking-Tools[/quote]

              I have downloaded the "valgrind" from the above link for MAC. How can i link that with Qt creator.

              Pratik Agrawal

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alexleutgoeb
                wrote on last edited by
                #7

                If your valgrind binary is not already in your PATH you can set the location manually in your project settings under Targets -> Run -> Analyzer and change the settings to "Custom" with your desired location under "Valgrind executable"

                I installed valgrind btw with homebrew, which makes it easy to install terminal tools and add them to your path.

                Alex

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  miroslav
                  wrote on last edited by
                  #8

                  Note that in the vast majority of cases, your code will have the same memory leaks on Linux, Mac or Windows (aka as "the ones you put in" :-) ). For performance there may be differences.

                  Mirko Boehm | mirko@kde.org | KDE e.V.
                  FSFE Fellow
                  Qt Certified Specialist

                  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