mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 09:29:19 +02:00
* Fix bug ID #32136, object not freed when replaced by another
git-svn-id: trunk@36724 -
This commit is contained in:
parent
0c42b6f44a
commit
be39ca0c85
@ -699,9 +699,10 @@ end;
|
||||
procedure TList<T>.SetItem(AIndex: SizeInt; const AValue: T);
|
||||
begin
|
||||
if (AIndex < 0) or (AIndex >= Count) then
|
||||
raise EArgumentOutOfRangeException.CreateRes(@SArgumentOutOfRange);
|
||||
|
||||
raise EArgumentOutOfRangeException.CreateRes(@SArgumentOutOfRange);
|
||||
Notify(FItems[AIndex], cnRemoved);
|
||||
FItems[AIndex] := AValue;
|
||||
Notify(AValue, cnAdded);
|
||||
end;
|
||||
|
||||
function TList<T>.GetEnumerator: TEnumerator;
|
||||
|
Loading…
Reference in New Issue
Block a user