Archived

This topic is now archived and is closed to further replies.

memory leaks

This topic is 5751 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Over #define and overload new & malloc, make them take __LINE__ and __FILE__ parameters, and build a map of all memory allocations.
Over #define and overload delete and free, and remove entries from the map.

Upon program termination, print out the remaining items in the map. Voila, the line and file the leak occur at.

Share this post


Link to post
Share on other sites
Why wouldn't you want to use MSVCRT debug routines from <crtdbg.h>?

Deciding between Direct3D and OpenGL... but keeping the rest of DirectX and MFC.

[edited by - IndirectX on March 19, 2002 3:16:44 PM]

Share this post


Link to post
Share on other sites
>>Why wouldn''t you want to use MSVCRT debug routines from ?

From the ''life is too hard'' files -> beleive it or not the de-bugger will not work because of a hardware confliction.
I have done all the obvious things like re-install the software, install a mates software, and after a virus I re-installed everything. I have a dual boot system and it doens''t work on either system. I also do know how to use the de-bugger properly becuase when I have minor problems I go across the road to my local computer store and install my software and de-bug everything in minutes, but I can only do that if none of the owners are there

As for the other things that people have suggested, I am currently trying everything The memory manager is an interesting program and it says I have 172 memory leaks that all come from the same line of code, because it''s legacy code I have to read up on the line in my text books to see what it does!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Losing memory?
Dropping objects?
Leaking resources?

Resource Management is a new methodology that is a C++ response to Java''s garbage collection without the overhead. You can start using it today.

---------------------------------------------
http://www.relisoft.com/resource/resmain.html
---------------------------------------------



The latest html-versions of "thinkin in C++ Vol.2" also includes some serious informations about Resource Managment ect.

--------------------------------------------------------
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
--------------------------------------------------------

or use the ShortCut to the Master Download Site:
http://64.78.49.204/
or dd
http://64.78.49.204/TICPP-2nd-ed-Vol-two.zip
http://64.78.49.204/TICPP-2nd-ed-Vol-one.zip
(Vol 1 rather covers C++/OOP Basics)

unzip and open: (Big or Small Index)
Vol 2: \html\IndexXTOC.htm or \html\Index.htm
Vol 1: Frames-expanded-TOC.html or Frames.html











Share this post


Link to post
Share on other sites
i would seriously consider trying to fix whatever conflicts you have to get msvc worling properly. because if you have a hardware conflict that breaks the debugger, it could conceivably break the compiler and cause other major problems. especially if you had a virus. just because you have a dual boot dont mean its too different systems. if its a win9x and winnt/xp/2k that uses fat32, then a virus could infect files on either system. (since its just a partition seperarting them). i suggest if you are having serious problems like this, do a complaete format of the entire drive, repartition and reinstall everything.

Share this post


Link to post
Share on other sites