<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff size=2>Hi 
Jeremy,</FONT></SPAN></DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff size=2>I 
think you need this one <A 
href="http://v.mahon.free.fr/pro/freeware/memcheck">http://v.mahon.free.fr/pro/freeware/memcheck</A></FONT></SPAN></DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2>;-)</FONT></SPAN></DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2>Regards</FONT></SPAN></DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff 
size=2>Leigh</FONT></SPAN></DIV>
<DIV><SPAN class=906495301-04052007><FONT face=Arial color=#0000ff size=2><A 
href="http://www.smootharm.com">www.smootharm.com</A></FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> delphi-bounces@delphi.org.nz 
  [mailto:delphi-bounces@delphi.org.nz]<B>On Behalf Of </B>Jeremy 
  Coulter<BR><B>Sent:</B> Friday, 4 May 2007 1:28 p.m.<BR><B>To:</B> 
  delphi@delphi.org.nz<BR><B>Subject:</B> [DUG] Dumb Friday 
  Question<BR><BR></FONT></DIV><FONT 
  style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma">
  <DIV>Hi All. This is a question that might be infulenced by some serious lack 
  of sleep :-)</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I have a funtion. Its return result is a TStringlist.</DIV>
  <DIV>In my code I&nbsp;create a&nbsp;TStringlist then add my values to it, 
  then pass this to the RESULT varaible for the function.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Now,&nbsp; this is prob. an obvious answer than I&nbsp;prob. do actually 
  know, but if I got:-</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>sResult := TStringList.create;</DIV>
  <DIV>sResult.add('blah');</DIV>
  <DIV>Result:=sResult;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Then if I free sResult, then I loss the values I added, and the result is 
  empty as you would expect.</DIV>
  <DIV>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?</DIV>
  <DIV>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 
  :-)</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Jeremy</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></FONT></BODY></HTML>