Пример #1
0
        /// <summary>
        /// Frees an object for generating the hashes that was acquired from <see cref="GetHasher"/>,
        /// adding it back to the pool for later reuse.
        /// </summary>
        /// <param name="hasher">The object to free.</param>
        static void FreeHasher(MD5 hasher)
        {
            lock (_hashersSync)
            {
                if (log.IsDebugEnabled)
                    log.DebugFormat("Freeing hasher [object hash: {0}].", hasher.GetHashCode());

                _hashers.Push(hasher);
            }
        }