Tracing memory leaks in VC++ 6
-
Did you take a look at the bottom of the "Debug" pane? That shows where they usally come from? (I assume you have done that). Next, do you have access to the dll source code? There is an application that will determine memory leaks, but I cannot think of it right now... Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
I have access to the source of all the DLLs. And like I said; it does NOT state the origin of the memory leaks, it must be one of the DLLs, but I can't figure out which one. Please remember the title of that program! :)
Make sure you build all the dll's in Debug. Run you application in Debug (inside the studio). Exit your application (when you know that the leaks (or suspected leaks occurre)). Open the output pane window, click the "Debug" tab, then go to the bottom. If there are memory leaks (that VS can find) they will be listed. Then if you double click on the source file, it will take you to where the item was created and then not released. Again, I am assuming that you have done all this. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Make sure you build all the dll's in Debug. Run you application in Debug (inside the studio). Exit your application (when you know that the leaks (or suspected leaks occurre)). Open the output pane window, click the "Debug" tab, then go to the bottom. If there are memory leaks (that VS can find) they will be listed. Then if you double click on the source file, it will take you to where the item was created and then not released. Again, I am assuming that you have done all this. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Yes, I have done it all. The point is that I DO see a HUGE list of memory leaks, I have a slight idea from which DLL and even class they come, but it wont give out any source files and/or lines. Only dumps objects...
Now I'm confused. I have several projects that I check that are built (the whole project including the dll's) and when there is a leak, it will give me the file/line of the offending object even if it is in the dll! When you compile your project, is the dll a dependency(sp) of the main project? Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Now I'm confused. I have several projects that I check that are built (the whole project including the dll's) and when there is a leak, it will give me the file/line of the offending object even if it is in the dll! When you compile your project, is the dll a dependency(sp) of the main project? Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
No, they're not dependencies. We have multiple actual programs which use the same shared DLLs, so the DLLs are mostly standalone projects alltogether. You think I can trace the leaks when I include the DLLs in question in the workspace of my project?
Yep I do. I thought you were already doing that. Do you know how to make them a dependancy? I'm assuming yes. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Yep I do. I thought you were already doing that. Do you know how to make them a dependancy? I'm assuming yes. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
I guess just adding them to the workspace will do the trick, no? If not, then please tell me :) - Fahr
Yes. But you have to make sure that the main exe project depends upon these dll's. This is done by: In the File View, right click on the "Workspace", Select "Insert Project into Workspace", when the dialog comes up, select the project to insert (the DLL in question), then check the "Dependency of" and select the main exe. When finished, make sure that you have "Debug" selected as the build and do a "Build All". This will compile the files for the DLL and your exe that uses them. Run the puppy and see what happens. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Yes. But you have to make sure that the main exe project depends upon these dll's. This is done by: In the File View, right click on the "Workspace", Select "Insert Project into Workspace", when the dialog comes up, select the project to insert (the DLL in question), then check the "Dependency of" and select the main exe. When finished, make sure that you have "Debug" selected as the build and do a "Build All". This will compile the files for the DLL and your exe that uses them. Run the puppy and see what happens. Larry Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Ok, I will try this when I'm back at work tomorrow :) Thanks a lot for the info, I'll let you know how it ended :) - Fahr
Any luck? Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz
-
Any luck? Larry J. Siddens Cornerstone Communications TAME THE DOCUMENT MONSTER www.unifier.biz