title: Dynamic TList of TList
body: <p>i have this problem: as i can add list to one list? i have tried so, but main list return always one list, and not understand where i mistake.
  The structure is this:</p>
  
  <pre><code>  PCombArray = array of Integer;
    PStatsRecord = record
      Comb: PCombArray;
      Freq: Integer;
    end;
    PStatsList = TList&lt;PStatsRecord&gt;;
    TStatsList = TList&lt;PStatsList&gt;;
  </code></pre>
  
  <p>Where Comb is a field that work as primary key. But here all ok. i define main list as:</p>
  
  <pre><code>var
    MainList: TStatsList;
    MySubList: PStatsList;
  </code></pre>
  
  <p>and create it, without problem. A procedure work for populate a subList; for esample i call this procedure as MakeSubList and assign a MySubList the list maked, then i add it to main list:</p>
  
  <pre><code>  MainList := TList&lt;PStatsList&gt;.Create;
    try
      MainList.Clear;    
      for index := 1 to N do // generate N subList
      begin  
        ...
        MySubList := MakeSubList(index); // contain correct sub list, no problem here
        ...
        MainList.Add(MySubList);  // add mysublist to mainlist
      end;
      writeln (mainList.count);  // return 1, and not N-1 sublist
    finally
      MainList.Free;
    end; 
  </code></pre>
  
  <p>Thank who help me to understand so i can solve it. Thanks again.</p>