Internet Direct (Indy)
Home
PreviousUpNext
TIdThread.Data Property

Storage slot for data used by a thread.

Pascal
property Data: TObject;

Data is a TObject property, and can contain a reference to any TObject descendant. Data can be used to store an object reference that will be required for the TIdThread descendant in either Run, BeforeRun, AfterRun, or event handler procedures in TIdTCPServer

It is the responsibility of the application to cast Data to the class instance required in a TIdThread or descendant, or an exception will be raised. 

Resources allocated to the Data property are initialized and assigned by the application. Resources allocated to the Data property will be freed in Destroy when the value itoDataOwner in included in the Options property.

Destroy 

Options

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.