public void Dispose() { if (_defaultCompartment != null) { _defaultCompartment.Dispose(); } _defaultCompartment = null; GC.SuppressFinalize(this); }
public void Dispose() { while (_compartmentStack.Count > 0) { _compartmentStack.Pop().Dispose(); } if (_defaultCompartment != null) { _defaultCompartment.Dispose(); } }
public void Dispose() { #if DEBUG if (_contextStack.Peek() != this) { throw new Exception("Missing dispose."); } #endif _contextStack.Pop(); if (_defaultCompartment != null) { _defaultCompartment.Dispose(); } _defaultCompartment = null; GC.SuppressFinalize(this); }
public void Dispose() { if (_compartmentStack != null) { while (_compartmentStack.Count > 0) { _compartmentStack.Pop().Dispose(); } _compartmentStack = null; } if (_defaultCompartment != null) { _defaultCompartment.Dispose(); } _defaultCompartment = null; GC.SuppressFinalize(this); }