Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    [SOLVED] Some questions about memory leaks

    General and Desktop
    3
    15
    3702
    Loading More Posts
    • 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.
    • N
      nicky j last edited by

      Are any of the tools you mentioned integrated into Qt Creator? If not can I easily integrate them?

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        vld is a library, so it's pretty much as any other library.
        cppcheck is an external program. It doesn't know about your IDE (creator). You just point it to where you keep your project.
        sdl is a compiler switch so you just pass it to the compiler in your .pro file

        1 Reply Last reply Reply Quote 0
        • N
          nicky j last edited by

          Ok, Ill look into these! Thanks for the help!

          1 Reply Last reply Reply Quote 0
          • N
            nicky j last edited by

            It seems cppcheck is just for windows, I am running OS X. Any alternatives?

            1 Reply Last reply Reply Quote 0
            • Chris Kawa
              Chris Kawa Moderators last edited by

              Yeah, the tools I listed are all for windows (that's what I'm on mostly).

              Clang has some nice tools I heard. Maybe this one: "clang static analyzer":http://clang-analyzer.llvm.org/

              1 Reply Last reply Reply Quote 0
              • N
                nicky j last edited by

                Ok I'll look at it.

                While messing about in my program I noticed something odd and possibly important. When I try to manipulate the Qlist in my nbhistory.h/cpp file, I get a crash. However if I do the EXACT SAME operations to a QList in my mainview.h/cpp file, it works and I don't get a crash. The biggest difference between these two files is that nbhistory.h/cpp contains multiple classes, while mainview.h/cpp contains only one. Could this have something to do with it? Why would a QList work in one file but not another?

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  cppcheck is available on OS X using e.g. macports

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 0
                  • Chris Kawa
                    Chris Kawa Moderators last edited by

                    Well again - it might, it might not have something to do with the bug. It might be a coincidence if one of those "multiple" classes happens to overwrite something somewhere.

                    No point in asking us that sort of questions I think. Without looking at the actual code we're as good as guessing.

                    1 Reply Last reply Reply Quote 0
                    • N
                      nicky j last edited by

                      Ive solved the problem!! I split up the classes into there own files.

                      Thank you for your help! I am going to mark this thread as solved :)

                      1 Reply Last reply Reply Quote 0
                      • Chris Kawa
                        Chris Kawa Moderators last edited by

                        Sounds weird that it would help. Maybe you just covered it up, but ok, great.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post