[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)


Add a string and associated object to the list.


Source position: classesh.inc line 701

public function TStrings.AddObject(

  const S: string;

  AObject: TObject

):Integer; virtual; overload;

function TStrings.AddObject(

  const Fmt: string;

  Args: array of Const;

  AObject: TObject

):Integer; overload;


AddObject adds S to the list of strings, and associates AObject with it. It returns the index of S.

Remark: An object added to the list is not automatically destroyed by the list when the list is destroyed or the string it is associated with is deleted. It is the responsibility of the application to destroy any objects associated with strings.

See also



Add a string to the list



Indexed access to the strings in the list.



Indexed access to the objects associated with the strings in the list.



Insert a string and associated object in the list.

Documentation generated on: Jun 22 2020