/// <summary>
        /// Restores an older delayed release pool from the pool stack.
        /// </summary>
        /// <param name="pool">The current delayed release pool.</param>
        private static void PopPool(DelayedReleasePool pool)
        {
            if (_currentPool != pool)
            {
                throw new OutOfOrderException(
                          "Attempted to pop a pool when it wasn't on top of the stack. " +
                          "This usually indicates that a pool was popped out-of-order."
                          );
            }

            _currentPool = PoolStack.Pop();
        }
 /// <summary>
 /// Sets the specified delayed release pool as the currently active pool.
 /// </summary>
 /// <param name="pool">The pool to set.</param>
 private static void PushPool(DelayedReleasePool pool)
 {
     PoolStack.Push(_currentPool);
     _currentPool = pool;
 }
        /// <summary>
        /// Restores an older delayed release pool from the pool stack.
        /// </summary>
        /// <param name="pool">The current delayed release pool.</param>
        private static void PopPool(DelayedReleasePool pool)
        {
            if (_currentPool != pool)
                throw new OutOfOrderException(
                    "Attempted to pop a pool when it wasn't on top of the stack. " +
                    "This usually indicates that a pool was popped out-of-order."
                    );

            _currentPool = PoolStack.Pop();
        }
 /// <summary>
 /// Sets the specified delayed release pool as the currently active pool.
 /// </summary>
 /// <param name="pool">The pool to set.</param>
 private static void PushPool(DelayedReleasePool pool)
 {
     PoolStack.Push(_currentPool);
     _currentPool = pool;
 }