<div dir="ltr"><div>project1.lpr</div>
<div> </div>
<div>program project1;</div>
<div>{$mode objfpc}{$H+}</div>
<div>uses<br> {$IFDEF UNIX}{$IFDEF UseCThreads}<br> cthreads,<br> {$ENDIF}{$ENDIF}<br> Interfaces, // this includes the LCL widgetset<br> Forms<br> { add your units here }, Unit1;</div>
<div>begin<br> Application.Initialize;<br> Application.CreateForm(TForm1, Form1);<br> Application.Run;<br>end.<br></div>
<div><strong>I forgot to say that the error occurs under WinCE.</strong></div>
<p>The error not always occurs, only sometimes. Why?</p>
<div><br></div>
<div class="gmail_quote">2008/10/2 Marc Weustink <span dir="ltr"><<a href="mailto:marc.weustink@cuperus.nl">marc.weustink@cuperus.nl</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">Bart wrote:<br>><br>><br>> Should you free the form if you set Application as the owner? Will not<br>> then Application try to free it again if the app closes, and throw an AV<br>> at you?<br>
<br></div>No, when you free componentA which is owned by componentB, then<br>componentA is removed from the childlist of componentB, avoiding a<br>double free.<br><font color="#888888"><br>Marc<br></font>
<div>
<div></div>
<div class="Wj3C7c"><br>_______________________________________________<br>Lazarus mailing list<br><a href="mailto:Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a><br><a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>