// @devnote: should be multithread safe
        static public void ReleaseObjectPool()
        {
            (new OleDbPermission(PermissionState.Unrestricted)).Demand();

            IntPtr hscp;

            Bid.ScopeEnter(out hscp, "<oledb.OleDbConnection.ReleaseObjectPool|API>\n");
            try {
                OleDbConnectionString.ReleaseObjectPool();
                OleDbConnectionInternal.ReleaseObjectPool();
                OleDbConnectionFactory.SingletonInstance.ClearAllPools();
            }
            finally {
                Bid.ScopeLeave(ref hscp);
            }
        }
Example #2
0
 // @devnote: should be multithread safe
 static public void ReleaseObjectPool()
 {
     OleDbConnectionString.ReleaseObjectPool();
     OleDbConnectionInternal.ReleaseObjectPool();
     OleDbConnectionFactory.SingletonInstance.ClearAllPools();
 }