Debugging Memory Leaks in C++: Seeking Advice

danieldelex

New member
Joined
Sep 24, 2024
Messages
4
Reaction score
0
Location
USA
Hello

I'm currently working on a C++ project and have noticed that my application is experiencing memory leaks. I've tried using basic debugging techniques; but I'm still struggling to identify where the leaks are occurring.:sleep:

Can anyone recommend effective tools or strategies for debugging memory leaks in C++; as well as best practices for managing memory in my code?

Any insights would be greatly appreciated!


Thank you:)
daniel
 

Expl01T3R

Active member
Joined
Nov 20, 2022
Messages
126
Reaction score
21
Location
Czech Republic
I'm using "Take snapshot" function in visual studio while debugging, there is special diagnostics tool, which let you take "memory dump" of allocations, heap size etc, from there you can take 2 snapshots (before, after) and compare them & find mem leaks.
FYI: ChatGPT would tell you the same.
 

Expl01T3R

Active member
Joined
Nov 20, 2022
Messages
126
Reaction score
21
Location
Czech Republic
If your application is executable which can be executed from anywhere, then I would also recommend Dr. Memory project.
 
Top