title: Problem adding lots of strings to a TStringList
body: <p>I have a problem adding strings to a TStringList. I've searched other posts but couldn't find an answer to this. </p>
  
  <p>What I'm trying to do is to add a big amount of strings to a TStringList (more than 14000) but somewhere in the process I get an EAccessViolation. Here's the code I'm using:</p>
  
  <pre><code>procedure TForm1.FormCreate(Sender: TObject);
  begin
      List := TStringList.Create;
      List.Duplicates := dupAccept;
  end;
  
  procedure TForm1.ButtonStartClick(Sender: TObject);
  begin
      List.Clear;
      List.Add('125-AMPLE');
      List.Add('TCUMSON');
      List.Add('ATLV 4300');
      List.Add('150T-15');
      List.Add('TDL-08ZE');
      List.Add('RT20L');
      List.Add('SIN LINEA');
      List.Add('TIARA');
      List.Add('FL200ZK1');
      List.Add('FL250ZK1');
      List.Add('SIN LINEA');
      List.Add('CENTAURO-70 S.P.');
      List.Add('CORSADO');
  
  { This list continues to about 14000 strings...}
  
      List.Add('VOSJOD 2');
      List.Add('Z 125');
      List.Add('ZUMY');
      List.Add('NEW AGE 125');
      List.Add('SIN LINEA');
  end;
  
  procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  begin
      FreeAndNil(List);
  end;
  </code></pre>
  
  <p>¿What's wrong with this code? The list contains duplicate strings so I set the <code>Duplicates</code> property to <code>dupAccept</code>. I was able to load the list using <code>LoadFromFile</code>, but I don't want to have a text file outside my application.</p>
  
  <p>I hope you can help me!!! Please tell me if you need any further information.</p>
  
  <p>Thank you very much. I really appreciate your help.</p>