UDT Reference

UDT Reference: Functions

#### cleanup

The cleanup method releases the UDT library from your application.

int cleanup(
);

##### Parameters

None.

##### Return Value

If success, 0 is returned; otherwise, UDT::ERROR is returned and specific error information can be retrieved by getlasterror.

In the current version, this method always succeed.

##### Description

The cleanup method releases the UDT library. All the remaining open connections will be closed. The background garbage collection is closed. However, this method will do nothing if no startup was ever called, or this is a repeated cleanup call.

The method must be called before the application exits, or before the UDT DLL is released, otherwise memory leak could happen.

##### See Also

startup