protected override void Dispose(bool explicitDispose) { if (explicitDispose) { _realHolder?.Dispose(); _disposeRegistry?.Dispose(); } _realHolder = null; _disposeRegistry = null; // base.Dispose(explicitDispose); }
internal P_HolderWithDisposeRegistry(T value, IEnumerable <IDisposable> disposables) { _realHolder = value.ToValueHolder(ownsValue: true); _disposeRegistry = new DisposeRegistry(disposables: disposables); }