RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideStrings.AddObject Method

Adds a string to the list, and associates an object with the string.

Pascal
function AddObject(const S: WideString; AObject: TObject): Integer; virtual;
C++
virtual __fastcall int AddObject(const BSTR S, TObject * AObject);

Call AddObject to add a string and its associated object to the list. AddObject returns the index of the new string and object.

Note: The TWideStrings object does not own the objects you add this way. Objects added to the TWideStrings object still exist even if the TWideStrings instance is destroyed. They must be explicitly destroyed by the application.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!