<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 08/06/2011 11:37, Zaher Dirkey wrote:
<blockquote
cite="mid:BANLkTiko+r+p-KQKvgVdgep-pBegKrPfpQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_quote">On Wed, Jun 8, 2011 at 11:22 AM, <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:michael.vancanneyt@wisa.be">michael.vancanneyt@wisa.be</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im"><br>
<br>
On Wed, 8 Jun 2011, Zaher Dirkey wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi, I know when compile the project with optimize in
Delphi the variable<br>
freed/allocated after the last line used.<br>
How can i make same in FPC, O3 not worked for me.<br>
I used FPC 2.4.4<br>
<br>
var<br>
c: Currency;<br>
begin<br>
c := 10;<br>
writeln(c);<br>
<<now c freed<br>
some code here<br>
end;<br>
</blockquote>
<br>
</div>
C (as a currency) is never 'freed'. It is declared
throughout the whole procedure.<br>
</blockquote>
</div>
<br>
What if C is string or Interface of TInterfacedObject?<br>
</div>
</blockquote>
<br>
<br>
Read the following threads, it has been lengthly discussed before:<br>
<br>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/lists/fpc-devel/2010-November/022806.html">http://lists.freepascal.org/lists/fpc-devel/2010-November/022806.html</a><br>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/lists/fpc-devel/2010-November/022867.html">http://lists.freepascal.org/lists/fpc-devel/2010-November/022867.html</a><br>
<br>
there may be more threads by the same subject<br>
<br>
</body>
</html>