In actual fact all "resources" are supposed to be freed with NT4 and above
when an application exits (One does assume this also applies to when it
crashes!!). In the case of Win9x this is also supposed to occur but in
reality it is not always the case.
However if your program runs for long enough and has enough resource type
leaks, it can then stop due "Out of Resources" eg Memory, Window Handles etc
- or crash windows for the same reason.
Myles.
-----Original Message-----
From: Alex Kouznetsov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 July 2001 2:09 p.m.
To: Multiple recipients of list delphi
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/