Identify memory leak in c++?

Asked

Viewed 694 times

1

Hello, I have recently had problems with the application I am developing. The application seems to lose performance during a certain run time. I checked my code but use only a single object dynamically allocated in memory, and I am calling your due destructor eventually, but the problem persists. Because the project at the moment has many object calls, I believe there is some memory leak in some part of the code. My question is, is there any tool to detect memory leaks (memory Leaks), and inform on what part of the code is occurring? I read in some places about Valgrind, but it is only compatible with the linux platform. I am currently using the Qt IDE Creator in Windows, with the project in Debug mode. Would anyone know about the existence of a similar tool or how to identify these memory leaks? Thanks in advance.

Note: I tried to debug the code using Qt Creator itself, but I had problems with the Ide, and the program simply won’t debug.

  • 5

    Yuri, in your question the title says one thing and the body says another. Do you want help identifying the leak or do you want tool tips? If it is the first option, try to provide the relevant code snippets (mainly where there is allocation and where it is called/invoked). If it is the second, I fear that this is not part of the scope of the site. You can request help with tips like this on [chat].

  • I will analyze more calmly and try to debug my code to provide a better scenario to talk about my problem, because in my current project, there are many object calls, but only 1 of them is stack. I will try to provide a better question soon. Thank you.

1 answer

1


  • Thank you, I will check the suggestions and see which one works best. Thank you for the reply.

  • 1

    @Yuri_pires: http://doc.qt.io/qtcreator/creator-analyzer.html

  • in this tutorial it uses Valgrind q is only available for linux, at the moment I am using windows :/

  • It turned out that none of the programs worked very well for me, but I will leave as a response to the post, because it can help other people with similar problem, Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.