[Lazarus] A todo list application

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Oct 3 10:51:21 CEST 2008


project1.lpr

program project1;
{$mode objfpc}{$H+}
uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { add your units here }, Unit1;
begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
*I forgot to say that the error occurs under WinCE.*

The error not always occurs, only sometimes. Why?

2008/10/2 Marc Weustink <marc.weustink at cuperus.nl>

> Bart wrote:
> >
> >
> > Should you free the form if you set Application as the owner? Will not
> > then Application try to free it again if the app closes, and throw an AV
> > at you?
>
> No, when you free componentA which is owned by componentB, then
> componentA is removed from the childlist of componentB, avoiding a
> double free.
>
> Marc
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20081002/8ea03d62/attachment-0007.html>


More information about the Lazarus mailing list