<HTML>
<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></FONT>
</HTML>