RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSession.Destroy Destructor

Destroys the instance of a session component.

Pascal
destructor Destroy; override;
C++
virtual __fastcall ~TSession();

Do not call Destroy directly. For session components other than the default session, an application should call Free, which verifies that the session component is not nil before calling Destroy.

Warning: Never destroy the default session. Freeing of the default session is handled automatically when an application terminates.
Destroy performs the following actions before calling its inherited destructor: 

Makes the session inactive, which closes all database connections. 

Removes the session from the session list. 

Resets database session references, if necessary. 

Frees the list of database components associated with the session. 

 

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