odbx_finish(3)

NAME
odbx_finish - Frees connection resources

SYNOPSIS
\FC#include <opendbx/api.h>\F[]

\FCint odbx_finish\F[]
\FC(odbx_t* handle);\F[]

DESCRIPTION
\FCodbx_finish\F[]() is responsible for freeing all resources allocated by \FCodbx_init\F[]() and finally may shut down the connection to the database server. It must not be invoked before calling \FCodbx_unbind\F[]() to avoid memory leaks and open connection descriptors on the client and server side which may block necessary resources later on.

The \FChandle\F[] parameter has to be the connection object created and returned by \FCodbx_init\F[](). It becomes invalid after it was supplied to \FCodbx_finish\F[]() for the first time and the function will return an error for all further invocations.

RETURN VALUE
\FCodbx_finish\F[]() returns \FCODBX_ERR_SUCCESS\F[], or an error code whose value is less than zero if \FChandle\F[] is invalid or one of the operations couldn't be completed successfully by the backend module. Possible error codes are listed in the error section and they can be feed to \FCodbx_error\F[]() and \FCodbx_error_type\F[]() to get further details.

ERRORS

-\FCODBX_ERR_PARAM\F[]
    \FChandle\F[] is NULL or the supplied connection object is invalid

SEE ALSO
\FCodbx_error\F[](), \FCodbx_error_type\F[](), \FCodbx_init\F[](), \FCodbx_unbind\F[]()