Ejemplo n.º 1
0
        /// <summary>
        /// Releases the unmanaged resources used by the  <see cref="TDBTransaction" />
        /// (these are really only resources held by the <see cref="WrappedTransaction" />
        /// and optionally releases the managed resources of that object.
        /// </summary>
        /// <param name="ADisposing">True to release both managed and unmanaged resources;
        /// false to release only unmanaged resources.</param>
        protected virtual void Dispose(bool ADisposing)
        {
            if (FTDataBaseInstanceThatTransactionBelongsTo != null)
            {
                FTDataBaseInstanceThatTransactionBelongsTo.ClearTransaction(this);
            }

            if (ADisposing)
            {
                if (FWrappedTransaction != null)
                {
                    FWrappedTransaction.Dispose();
                    FWrappedTransaction = null;
                }
            }
        }