[DUG] Dumb Friday Question
Myles Penlington
myles at ams.co.nz
Fri May 4 14:00:33 NZST 2007
Actually in D2006/D2007 it does not work. You just use FastMM instead -
which has the equivalent options when running in Debug mode.
Myles.
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Leigh Wanstead
Sent: Friday, 4 May 2007 01:55
To: vss at vss.co.nz; NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] Dumb Friday Question
Hi Jeremy,
I think you need this one http://v.mahon.free.fr/pro/freeware/memcheck
;-)
Regards
Leigh
www.smootharm.com
-----Original Message-----
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz]On Behalf Of Jeremy Coulter
Sent: Friday, 4 May 2007 1:28 p.m.
To: delphi at delphi.org.nz
Subject: [DUG] Dumb Friday Question
Hi All. This is a question that might be infulenced by some
serious lack of sleep :-)
I have a funtion. Its return result is a TStringlist.
In my code I create a TStringlist then add my values to it, then
pass this to the RESULT varaible for the function.
Now, this is prob. an obvious answer than I prob. do actually
know, but if I got:-
sResult := TStringList.create;
sResult.add('blah');
Result:=sResult;
Then if I free sResult, then I loss the values I added, and the
result is empty as you would expect.
But the issue I have is, so if I DONT free sResults, what
happens to it? Surley it stays in memory,a dn I would end up with a
memory leack after repeaditive calls. Is that right? Or is because the
variable is function specific its free by default etc?
Its a basic question I know....but the more I thought about it
the more uncertain I became....I really need some sleep so that prob.
the real probelm :-)
Jeremy
Attention:
This communication is confidential and may be legally privileged. If you are not the intended recipient, please do not use, disclose, copy or distribute it, other than to return it to us with your confirmation that it has been deleted from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.adventureeducation.co.nz/pipermail/delphi/attachments/20070504/59a9491a/attachment-0001.html
More information about the Delphi
mailing list