Просмотр исходного кода

* optimized and simplified tai_aggregatetypedconst destruction

git-svn-id: trunk@41963 -
Jonas Maebe 6 лет назад
Родитель
Сommit
213b87fe91
1 измененных файлов с 3 добавлено и 5 удалено
  1. 3 5
      compiler/aasmcnst.pas

+ 3 - 5
compiler/aasmcnst.pas

@@ -70,7 +70,7 @@ type
      { iterator to walk over all individual items in the aggregate }
      { iterator to walk over all individual items in the aggregate }
      tadeenumerator = class(tobject)
      tadeenumerator = class(tobject)
       private
       private
-       fvalues: tfplist;
+       fvalues: tfpobjectlist;
        fvaluespos: longint;
        fvaluespos: longint;
        function getcurrent: tai_abstracttypedconst;
        function getcurrent: tai_abstracttypedconst;
       public
       public
@@ -81,7 +81,7 @@ type
      end;
      end;
 
 
     protected
     protected
-     fvalues: tfplist;
+     fvalues: tfpobjectlist;
      fisstring: boolean;
      fisstring: boolean;
 
 
      { converts the existing data to a single tai_string }
      { converts the existing data to a single tai_string }
@@ -744,7 +744,7 @@ implementation
      begin
      begin
        inherited;
        inherited;
        fisstring:=false;
        fisstring:=false;
-       fvalues:=tfplist.create;
+       fvalues:=tfpobjectlist.create(true);
      end;
      end;
 
 
 
 
@@ -831,8 +831,6 @@ implementation
      var
      var
        ai: tai_abstracttypedconst;
        ai: tai_abstracttypedconst;
      begin
      begin
-       for ai in self do
-          ai.free;
        fvalues.free;
        fvalues.free;
        inherited destroy;
        inherited destroy;
      end;
      end;