When I read the original question I read it was asking "When the application
closes is all allocated memory released?"  Reading the answers, it appears
that what most people read it was "While and application is still running,
and an object is destroyed, are the objects owned/parented by this object
also destroyed?"

These are two totally different questions.  I would hope that the answer
to the first is "yes" and would imagine that the answer to the second is
"sometimes - it depends on circumstances".

Please tell me if I am wrong.

Chrissy.

----- Original Message -----
From: Alex Kouznetsov <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 2:09 PM
Subject: Re: [DUG]: Destroying Objects


> I have had an impression that with latest versions of Windows, when an
> application exits, absolutelly all the memory it has allocated is freed by
> OS.
>
> Alex
>
> ----- Original Message -----
> From: "Sergei Stenkov" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Thursday, 19 July 2001 10:36
> Subject: RE: [DUG]: Destroying Objects
>
>
> > Ross,
> >
> > > When an application exits in the normal way, does it automatically
> > > destroy all objects created at runtime?
> >
> > No. You'll need to take care of them
> >
> > var
> >   Obj: TObject;
> > begin
> >   Obj := TObject.Create;
> >   try
> >
> >     // do what you need
> >
> >   finally
> >     Obj.Free;
> >   end;
> > end;
> >
> > Cheers,
> > Sergei Stenkov
>
> --------------------------------------------------------------------------
> -
> >     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to