public void Dispose() { if (state == WriteGroupState.PENDING) { System.Console.WriteLine("disposed transaction still pending " + this.tsn); // throw new Exception("disposed Txn still pending " + this.tsn); } mylayer.pending_txns.Remove(this.tsn); }