title: Threadlist of TObject with Delphi - How to populate?
body: <p>From my limited knowledge about this subject, the following code should work. But I have not the expected result:</p>
  
  <pre><code>type
    TClient = class(TObject)
      Host: String;
    end;
  
  var
    Clients: TThreadList;
  
  const
    Hosts: Array[0..5] of String = ('HOST1', 'HOST2', 'HOST3', 'HOST4', 'HOST5', 'HOST6');
  var
    I: Integer;
    List: TList;
    Client: TClient;
  begin
    try
      for I := Low(Hosts) to High(Hosts) do
      begin
        Client := TClient.Create;
        with Client Do
        try
          Host := Hosts[I];
          List := Clients.LockList;
          try
            Clients.Add(Client);
          finally
            Clients.UnlockList;
          end;
        finally
          Client.Free;
        end;
      end;
    except
      on E:Exception Do ShowMessage(E.Message);
    end;
  
  // RESULT TEST
  List := Clients.LockList;
  try
    I := List.Count;
    S := TClient(List.Items[0]).Host;
  finally
    Clients.UnlockList;
  end;
  ShowMessage(IntToStr(I));
  ShowMessage(S);
  </code></pre>
  
  <p>My expected result would be 6 and HOST1, but I got 1 and "" (empty)</p>
  
  <p>Please, what I am missing?</p>
  
  <p>Thanks!</p>