repeat this
when i set the freeonterminate to true app will stuck in thread.waitfor . why ?
for TIndex := 0 to 3 do
begin
SetLength(TThread, Length(TThread) + 1);
TThread[Length(TThread) - 1] := TThread.Create;
Sleep(1000);
end;
for TIndex := Low(TThread) to High(TThread) do
begin
TThread[TIndex].WaitFor;
end;
You can't wait for threads, that free themselfs
oh thnks . so after waits end must free them by my self ?
Обсуждают сегодня