mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 09:39:11 +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);
|
||||
|
||||
Var
|
||||
I : Integer;
|
||||
|
||||
begin
|
||||
Notify(Item,cnExtracting);
|
||||
FItems.Remove(Pointer(Item));
|
||||
Notify(Item,cnExtracting);
|
||||
I:=FItems.IndexOfItem(Item,fromEnd);
|
||||
If (I<>-1) then
|
||||
FItems.Delete(I);
|
||||
Item.FCollection:=Nil;
|
||||
Changed;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user