RE: [DUG] Self Freeing

2004-03-18 Thread Stephen Bertram
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

2004-03-18 Thread Stephen Bertram
: 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

Re: [DUG] Self Freeing

2004-03-18 Thread Dennis Chuah
- 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

RE: [DUG] Self Freeing

2004-03-18 Thread Conor.Boyd
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

RE: [DUG] Self Freeing

2004-03-18 Thread James Sugrue
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

RE: [DUG] Self Freeing

2004-03-18 Thread Conor.Boyd
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

Re: [DUG] Self Freeing

2004-03-18 Thread Robert martin
- 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

[DUG] Self Freeing

2004-03-17 Thread Paul Mckenzie
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

Re: [DUG] Self Freeing

2004-03-17 Thread Paul Mckenzie
, 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

RE: [DUG] Self Freeing

2004-03-17 Thread Nahum.Wild
- 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

RE: [DUG] Self Freeing

2004-03-17 Thread Stacey Verner
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