title: How should I free an array of objects in a Delphi 7 destructor?
body: <p>Suppose my Delphi classes look like this:</p>
  
  <pre><code>interface
  type
  
      TMySubInfo = class
      public
          Name : string;
          Date : TDateTime;
          Age  : Integer;
      end;
  
      TMyInfo = class
      public
          Name : string;
          SubInfo : array of TMySubInfo;
          destructor Destroy; override;
      end;
  
  implementation
  
      destructor TMyInfo.Destroy;
      begin
        // hmmm..
      end;
  
  end.
  </code></pre>
  
  <p>To properly clean up, what should go in the destructor? Is it enough to do <code>SetLength(SubInfo,0)</code>, or do I need to loop through and free each <code>TMySubInfo</code>? Do I need to do anything at all?</p>