Delphi-Quellcode:
Type TThreads = packed Array of TThread;
Procedure RemoveThread(Var A: TThreads; Index: Integer);
Begin
If (Index < 0) or (Index >= Length(A)) Then Exit;
//A[Index].Free;
MoveMemory(@A[Index], @A[Index + 1],
(High(A) - Index) * SizeOf(TThread));
SetLength(A, High(A));
End;
Free, falls das TThread-Objekt noch freigegeben werden muß