- Timestamp:
- Jun 29, 2012, 7:12:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericListObject.inc
r325 r381 15 15 private 16 16 procedure Put(Index: TGListIndex; const AValue: TGListItem); override; 17 procedure SetCount(const AValue: TGListIndex); override; 17 18 public 18 19 OwnsObjects: Boolean; … … 20 21 function InsertNew(Index: TGListIndex; NewObject: TGListItem = nil): TGListItem; 21 22 procedure Delete(Index: TGListObjectIndex); override; 22 procedure Clear; override;23 23 procedure Assign(Source: TGList); override; 24 24 constructor Create; override; … … 85 85 end; 86 86 87 procedure TGListObject. Clear;87 procedure TGListObject.SetCount(const AValue: TGListIndex); 88 88 var 89 89 I: TGListObjectIndex; 90 90 begin 91 91 if OwnsObjects then begin 92 I := 0;93 while I < Countdo begin92 I := FCount - 1; 93 while I >= AValue do begin 94 94 FItems[I].Free; 95 I := I +1;95 I := I - 1; 96 96 end; 97 97 end; 98 inherited Clear;98 inherited; 99 99 end; 100 100
Note:
See TracChangeset
for help on using the changeset viewer.