OdbcConnection.ReleaseObjectPool Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 ()
Remarks
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:
Call Close to release the OdbcConnection object from the environment.
Allow each connection object to time out.
Call ReleaseObjectPool.
Invoke garbage collection.
Conversely, if you call Close on all active connections, and invoke garbage collection, but do not call ReleaseObjectPool, the resources reserved for the environment remain available.
After an environment handle is released, a request for a new OdbcConnection creates a new environment.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기