TcxObjectList.FreeAndRemove(TObject) Method
Removes the specified item from the list and destroys it.
Declaration
function FreeAndRemove(AObject: TObject): Integer;
Parameters
Name | Type |
---|---|
AObject | TObject |
Returns
Type |
---|
Integer |
Remarks
Call this function and pass a stored object as the AObject parameter to destroy the object regardless of the OwnObjects property value. The function returns -1 if the specified object is not within the list or does not exist; otherwise, calls the FreeAndDelete procedure to destroy the object and returns its position (index) within the list.
See Also