Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Heap memory leaks - how to debug the fastest way?[SOLVED]
Re: Heap memory leaks - how to debug? [message #1781 is a reply to message #1773] |
Sat, 18 March 2006 21:26 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Sat, 18 March 2006 10:54 |
fudadmin wrote on Fri, 17 March 2006 18:02 | In my app buglog I have
Heap leaks detected:
MemoryWatch(0xDE2388);
MemoryWatch(0xDE23C8);
MemoryWatch(0xDE2448);
MemoryWatch(0xDE2488);
How to find the culprits the fastest way?
|
Well, there is the purpose for above format
Put those MemoryWatch at the beginning of APP_MAIN, then place breakpoint at the line 79 of Core/heapdbg.cpp and start in debug mode...
Well, in fact, this does not help always (because the memory can be allocated and deallocated many times before being leaked), but usually it is a good idea to give it a try. If that fails, use traditional methods.... (usually, deactivate parts of the code until you spot the leak).
BTW, most memory leaks I have experienced recently were caused by missing virtual destructor.
Mirek
|
Thank you. That's very useful. I'll try. Meanwhile, I had found the culpripts using traditional ways. I'm pretty sure that was some name clashes with U++...
|
|
|
Goto Forum:
Current Time: Sat Jun 08 23:16:41 CEST 2024
Total time taken to generate the page: 0.01621 seconds
|