On 12/03/2015 09:26 PM, Krzysztof wrote:
How to destroy object or component in its own method
You can do a "pseudo-finalizer" method in an object that just ends by
"Free;".
Here you (e.g. ion a thread) can create an object and queue that
function via TThread.Queue, TThread.Synchronize, or
Hi,
How to destroy object or component in its own method (do this in next
message queue)? Currently I'm using Application.QueueAsyncCall but IIRC
there is special routine in FPC/LCL but can't find. For example Qt has
myobject.qDeleteLater()
Regards
--
On December 3, 2015 9:26:39 PM GMT+01:00, Krzysztof wrote:
>Hi,
>
>How to destroy object or component in its own method (do this in next
>message queue)? Currently I'm using Application.QueueAsyncCall but IIRC
>there is special routine in FPC/LCL but can't find. For example Qt has
procedure TForm1.FormCreate(Sender: TObject);
begin
FRecycleBin := TObjectList.Create(True);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
FRecycleBin.Free;
end;
procedure TForm1.ApplicationProperties1Idle(Sender: TObject; var Done:
Boolean);
begin
FRecycleBin.Clear;
Done :=
On 12/3/15, Krzysztof wrote:
> How to destroy object or component in its own method (do this in next
> message queue)? Currently I'm using Application.QueueAsyncCall but IIRC
> there is special routine in FPC/LCL but can't find. For example Qt has
> myobject.qDeleteLater()