Quote: |
Now if heap leak manifests when connecting to external library, it is even more puzzling... (have you any 'new' in your code?) |
Quote: |
Anyway, for U++ based code, I usually start with looking at log file, which dumps all leaks. Quite often you can tell what the leak is just examining it. |
Quote: |
If that does not help, there is one ugly hack in heap code - you can add "memory-watch" into your APP_MAIN to catch the allocation that returns the address the leaks. (see Core/dbgheap.cpp for details - you place breakpoint there to catch). That of course helps only as long as leaking allocation for the specific address is the first one... |
Quote: |
Then of course, if everything else fails, I usually start to "minimize" code, removing part after part until leak goes away (then the bug is in the part I removed). |