How can I determine whether a Delphi < T > is of a specific class and not for example record? I want to release an element of a list, if it is a class when cleaning.
procedure TTableData<T>.Delete(Index: Integer);
begin
if Items[Index] is TClass then TClass(Items[Index]).Free;
inherited Delete(Index);
end;