Ignore:
Timestamp:
Dec 23, 2010, 9:50:33 AM (14 years ago)
Author:
george
Message:
  • Fixed: String type is reference counter thus have to be properly cleared in similar fashion to objects. Problem is caused by use of System.Move procedure where instance of strings are not reference count decremented. Introduced generic class TGListString which is used for common TListString class.
Location:
Generics/TemplateGenerics/Generic
Files:
3 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Generic/GenericList.inc

    r91 r101  
    2626    procedure AddArray(Values: array of TGListItem);
    2727    procedure AddList(List: TGList);
    28     procedure Assign(List: TGList);
     28    procedure Assign(Source: TGList); virtual;
    2929    procedure Clear; virtual;
    3030    procedure Contract;
     
    126126end;
    127127
    128 procedure TGList.Assign(List: TGList);
     128procedure TGList.Assign(Source: TGList);
    129129var
    130130  I: Integer;
    131131begin
    132   Count := List.Count;
     132  Count := Source.Count;
    133133  I := 0;
    134134  while I < Count do begin
    135     Items[I] := List[I];
     135    Items[I] := Source[I];
    136136    I := I + 1;
    137137  end;
Note: See TracChangeset for help on using the changeset viewer.