The following is taken from Julian Bucknalls' Excellent 'Tomes of Delphi - Algorithms and Data Structures'
Only Delphi 1 requires the size of the allocated block with a call to FreeMem, All 32 bit versions of Delphi store the size of an allocated block with the block itself .. they ignore any size value you pass into FreeMem and use the hidden value instead. Paul. > ----- Original Message ----- > From: "Fahri Reza" <[EMAIL PROTECTED]> > To: advanced_delphi@yahoogroups.com > Subject: [advanced_delphi] hunting leaks > Date: Fri, 10 Oct 2008 01:47:55 +0700 > > > is there a free app that detect memory leaks in delphi. > > 1. I've been haunted by doubts whether asigning literal > to a variable of type PChar would create a leak. > > 2. about FreeMem(), since a pointer stores its own size, > FreeMem's second parameter doesn't seem to do anything. > I am cautios about it. I have a strong urge to set the size > parameter for every call to FreeMem. > Which most of the time is not feasable. > > TIA > ------------ > FIreHAzaR:-D > West Java, Indonesia > Experience is something you don't get until just after you need it. -- _______________________________________________ Surf the Web in a faster, safer and easier way: Download Opera 9 at http://www.opera.com Powered by Outblaze