Hello, i play a bit with TThread.Queue
the following code cause memory leak on my machine(see signature)
Type
{ TTest }
TTest = class
procedure sayHello();
end;
{ TTest }
procedure TTest.sayHello;
begin
WriteLn('hello world');
end;
var
test: TTest;
begin
test := TTest.Create;
try
TThread.Queue(TThread.CurrentThread,@test.sayHello);
finally
test.Free;
//TThread.CurrentThread.Free;
end;
however if i uncomment the last code ( TThread.CurrentThread.Free; ) all memory cleanup successfully.
is this intended behaviour? or may be a bug?
hanks in advance