anchor.diff:        Terms.Add( lTerm );
       end;
     except
  -    Destroy; // clean up
  -    raise; // reraise exception
  +      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;
  +    begin
  +      i := TSearchTerm(Terms.Last);
  +      Terms.Remove(i);
  +      i.Free;
  +    end;
  +
  +    //  DestroyListObjects( Terms );
  +    Terms.Free;
     end;
   
  -//  DestroyListObjects( Terms );
  -  Terms.Destroy;
   end;
   
   function TTextSearchQuery.GetTerm( index: longint ): TSearchTerm;
  
positive.code:   end;
  
    TTextSearchQuery = class
    protected
      Terms: TList;
      function GetTerm( Index: longint ): TSearchTerm;
  
negative.code:   CombineMethod: TSearchTermCombineMethod;
    lTerm: TSearchTerm;
  begin
    inherited Create;
    Terms := TList.Create;
    try
      RemainingSearchString := Uppercase( SearchString );
  