help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TFPObjectList.Add

Add an object to the list.

Declaration

Source position: contnrs.pp line 47

public function TFPObjectList.Add(

  AObject: TObject

):Integer;

Arguments

AObject

  

The object to add

Function result

The index of the object in the list.

Description

Add adds AObject to the list and returns the index of the object in the list.

Note that when OwnsObjects is True, an object should not be added twice to the list: this will result in memory corruption when the object is freed (as it will be freed twice). The Add method does not check this, however.

Errors

None.

See also

TFPObjectList.OwnsObjects

  

Should the list free elements when they are removed.

TFPObjectList.Delete

  

Delete an element from the list.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505