Connection. Release Object Pool Method
Indicates that the ODBC Driver Manager environment handle can be released when the last underlying connection is released.
public: static void ReleaseObjectPool();
public static void ReleaseObjectPool ();
static member ReleaseObjectPool : unit -> unit
Public Shared Sub ReleaseObjectPool ()
ReleaseObjectPool can be called to release the ODBC environment handle. You might want to call this method if, for example, the connection object will not be used again. When all connections in the environment are closed, the environment can be disposed. Note that calling the method alone does not actually release the active connections that exist in the environment.
The following must occur before the environment is finally disposed:
Allow each connection object to time out.
Invoke garbage collection.
After an environment handle is released, a request for a new OdbcConnection creates a new environment.