You could use a class procedure that creates the object, does stuff and
free's it.

Stacey

> -----Original Message-----
> From: Robert Martin [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, 20 August 2002 12:09 p.m.
> To: Multiple recipients of list delphi
> Subject: [DUG]: TThread to TObject conversion
> 
> 
> Juts moving an app. from using a Thread to a Std object.  Is 
> there a good way to have an object that frees itself after 
> doing its work.
> 
> i.e  current code
> 
> Tmythread.Create(Params, Params, Params, Params);            
> //Thread runs
> and frees
> 
> i.e desired code 
> TMyWasThread.Create(SameParams,SameParams,SameParams,SameParams,);
> //TObject runs and frees itself
> 
> The advantage of this would be that I could just change the 
> Class and not all the code that uses it.
> 
> Rob
> 
> Software engineer
> Wild Software Ltd
> Ph 03 338-1407
> 
> 
> --------------------------------------------------------------
> -------------
>     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