From f56fc16973d66bd9461f247e50738e55bd54de7e Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 4 Nov 2015 19:28:43 +0700 Subject: Replace Close with Dispose for PORTABLE --- crypto/src/util/io/TeeOutputStream.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'crypto/src/util/io/TeeOutputStream.cs') diff --git a/crypto/src/util/io/TeeOutputStream.cs b/crypto/src/util/io/TeeOutputStream.cs index 75d1d305d..7ad14a007 100644 --- a/crypto/src/util/io/TeeOutputStream.cs +++ b/crypto/src/util/io/TeeOutputStream.cs @@ -18,11 +18,23 @@ namespace Org.BouncyCastle.Utilities.IO this.tee = tee; } - public override void Close() +#if PORTABLE + protected override void Disposing(bool disposing) + { + if (disposing) + { + Platform.Dispose(output); + Platform.Dispose(tee); + } + base.Dispose(disposing); + } +#else + public override void Close() { Platform.Dispose(output); Platform.Dispose(tee); } +#endif public override void Write(byte[] buffer, int offset, int count) { -- cgit 1.5.1