Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory Leaks

Status
Not open for further replies.

Fluke026

Programmer
Aug 20, 2002
32
0
0
US
Hello,

I have a program using D5 Pro that seems to have at least one memory leak. I just verified the existence of the leaks last night. I will begin extensive searching in the next few days (I am something of a hobby programmer, not a professional, so I code and test in the evenings).

I was wondering if anyone knows of any good tips/libraries to track leaks down. I have the article TCondom from Borland's website.

One last question. I have been rather diligent to make sure that I free all instances of classes that I created, so I am wondering if the problem is in 3rd party components. All of my components are included with Delphi except TStringAlignGrid and a few items from the Raize List Pack. Does anyone know if TRaize has problems with memory leaks in D5?

Thank you,
Frank Luke
 
I found a great little tool for tracking down memory leaks called MemCheck. You just add this file to your project, call the MemChk procedure as the first line in your project (in the .dpr file), set a few options on the compiler page, and execute your program.

MemCheck will watch your code and give you a list of all the memory leaks caused by your run. Notice that it can only find leaks that execute. MemCheck will even give you a report of where the memory was requested but never released by line and unit.

Using this tool, I removed a myriad of leaks in less time than I imagined. It was just as easy to remove the watcher when I was done. If you have memory leaks in your program (and they crop up easily), I encourage you to give MemCheck a try. You can't beat the price.


Frank Luke
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top