Developers Group - Delphi
ListSubject: RE: [DUG] Self Freeing
In
the case of a form override OnClose and set Action to
caFree;.
procedure TMyForm.FormClose(Sender: TObject; var Action:
TCloseAction);begin
Action := caFree;
end;
Stacey
-Original Message
: Re: [DUG] Self Freeing
I like having an Owner - (But could if necessary
have no Owner).
I want the Component initiate the free in a
non-static method (eg OnExit, OnClick)
No longer referring to the variable - that is not
a problem.
This is all just in the main (only)
thread
- Delphi List [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 10:11 AM
Subject: RE: [DUG] Self Freeing
My understanding is:
1. If a component has an owner then the owner will try to free it during its
destroy method leading to an access violation if it is freed elsewhere. So
if you are explicitly
Title: Message
Yeah, I would be hesitant too.
WRT forms however, what you can safely do is call Release
(which is introduced on TCustomForm). This will free the form, but only
when all event handlers, etc. have finished processing.
HTH,
Conor
From: Paul Mckenzie [mailto:[EMAIL
Group - Delphi List'
Subject: RE: [DUG] Self Freeing
WRT forms however, what you can safely do is call Release
(which is introduced on TCustomForm). This will free the form,
but only when all event handlers, etc. have finished processing.
then there's that old method named
Nice. ;-)
You can tell it's Friday...
-Original Message-
From: Stephen Barker [mailto:[EMAIL PROTECTED]
WRT forms however, what you can safely do is call Release (which is
introduced on TCustomForm). This will free the form,
but only when all event handlers, etc. have finished
- Delphi List' [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 12:35 PM
Subject: RE: [DUG] Self Freeing
WRT forms however, what you can safely do is call Release
(which is introduced on TCustomForm). This will free the form,
but only when all event handlers, etc. have finished processing
What is the best way for a dynamically created
component to free itself ?
RegardsPaul McKenzieAnalyst
ProgrammerSMSS Ltd.
___
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi
, March 18, 2004 4:07
PM
Subject: RE: [DUG] Self Freeing
Explicitly free it when you are done with it (maby add it to a list?)
or set its owner to something valid so when the owner component is freed the
dynamically created component will also be freed.
Stacey
- Delphi ListSubject: Re: [DUG] Self
Freeing
But I want to self Free - ie immediately after
executing its event it frees itself (eg OnClick).
RegardsPaul McKenzieAnalyst ProgrammerSMSS
Ltd.
- Original Message -
From:
Stacey
Verner
To: NZ Borland
March 2004
16:23To: NZ Borland Developers Group - Delphi
ListSubject: Re: [DUG] Self Freeing
But I want to self Free - ie immediately after
executing its event it frees itself (eg OnClick).
RegardsPaul McKenzieAnalyst ProgrammerSMSS
Ltd.
- Original Message
11 matches
Mail list logo