mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 12:28:04 +02:00
* Remove using reverse search, speed up free
git-svn-id: trunk@19280 -
This commit is contained in:
parent
4a8914cbb0
commit
d766e671a9
@ -215,9 +215,15 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TCollection.RemoveItem(Item: TCollectionItem);
|
procedure TCollection.RemoveItem(Item: TCollectionItem);
|
||||||
|
|
||||||
|
Var
|
||||||
|
I : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Notify(Item,cnExtracting);
|
Notify(Item,cnExtracting);
|
||||||
FItems.Remove(Pointer(Item));
|
I:=FItems.IndexOfItem(Item,fromEnd);
|
||||||
|
If (I<>-1) then
|
||||||
|
FItems.Delete(I);
|
||||||
Item.FCollection:=Nil;
|
Item.FCollection:=Nil;
|
||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user