anchor.diff:    end;
   
     TTextSearchQuery = class
  +  private
  +    procedure Cleanup;
     protected
       Terms: TList;
       function GetTerm( Index: longint ): TSearchTerm;
  
positive.code:   CombineMethod: TSearchTermCombineMethod;
    lTerm: TSearchTerm;
  begin
    Terms := TList.Create;
    try
      RemainingSearchString := Uppercase( SearchString );
  
negative.code:       Terms.Add( lTerm );
      end;
    except
        while Terms.Count > 0 do
        begin
          lTerm := TSearchTerm(Terms.Last);
          Terms.Remove(lTerm);
          lTerm.Free;
        end;
        Terms.Free;
        raise; // reraise exception
    end;
  end;
  
  destructor TTextSearchQuery.Destroy;
  begin
    Cleanup;
    inherited Destroy;
  end;
  
  procedure TTextSearchQuery.Cleanup;
  var
    i: TSearchTerm;
  begin
    if Assigned(Terms) then
    begin
    while Terms.Count > 0 do
      begin
        i := TSearchTerm(Terms.Last);
        Terms.Remove(i);
        i.Free;
      end;
  
      //  DestroyListObjects( Terms );
      Terms.Free;
    end;
  
  end;
  
  function TTextSearchQuery.GetTerm( index: longint ): TSearchTerm;
  