コード例 #1
0
        // Protected implementation of Dispose pattern.
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                // Free any other managed objects here.
                if (_collection != null)
                {
                    _collection.Dispose();
                }
                _collection = null;
            }

            // Free any unmanaged objects here.
            //
            disposed = true;
        }