Topic Path: Symbol Reference > Classes > TIdUDPServer Class > TIdUDPServer Methods > Destroy Destructor
ContentsIndexHome
PreviousUpNext
TIdUDPServer.Destroy Destructor

Destructor for the object instance.

destructor Destroy; override;

Destroy is the destructor for the TIdUDPServer instance. Destroy sets the Value in Active to False, which forces the listener thread for the server to be stopped and prevents accepting new datagrams from client connections. 

Destroy also closes any connections using socket handles in Bindings, and frees the TIdSocketHandle instances. 

Destroy calls the inherited destructor prior to exiting from the method. 

Destroy should not be directly called in an application. Use Free instead. Free checks to ensure that the object reference is not Nil before calling Destroy. 

Note: 

If an exception is emitted from the constructor, the destructor is called to destroy the partially constructed object instance. Destructors should check that allocated resources, such as handles, were actually allocated before trying to release them.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.