System.Classes.TInterfaceList.Remove
Delphi
function Remove(const Item: IInterface): Integer;
C++
int __fastcall Remove(const System::_di_IInterface Item);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TInterfaceList |
Description
Removes an interface from the list.
Call Remove to remove an interface from the list. For multithreading purposes, the list is locked before the removing operation begins and unlocked afterwards.
Remove returns either the index of the removed interface or –1, if the interface was not found.
Note: The interface list only stores pointers to the interfaces. Removing an interface from the list decreases the interfaces reference count by 1. The interface is freed only if there are no more references to it.