title: How to destroy array of arrays
body: <pre><code>myarr : array [0 .. 21] of array [0 .. 21] of TColor;
  </code></pre>
  
  <p>above is the declaration , after the use i want to destroy the array of array </p>
  
  <pre><code>for a := 0 to 21 do
    for b := 0 to 21 do
          myarr[a][b].destroy ;
         //myarr[a,b].destroy ;
  </code></pre>
  
  <p>both the code are giving me error ,</p>
  
  <blockquote>
    <p>E2018 Record, object or class type required (Delphi)</p>
  </blockquote>
  
  <p>this is actually implemented inside a class , and i want to do this when the object of class is being destroyed</p>
  
  <p>i have implemented this when a mouse click is executed the previous object(which includes this array) must be destroyed and a new object must be created.Practically when this happens the their must be no any extra memory left , but when i check this in my windows task manager for each click another 200 kb is added ,my app will do this for multiple times.</p>