diff options
Diffstat (limited to 'crypto/src/util/zlib/ZInputStream.cs')
-rw-r--r-- | crypto/src/util/zlib/ZInputStream.cs | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/crypto/src/util/zlib/ZInputStream.cs b/crypto/src/util/zlib/ZInputStream.cs index 671cf68b0..4b7351555 100644 --- a/crypto/src/util/zlib/ZInputStream.cs +++ b/crypto/src/util/zlib/ZInputStream.cs @@ -93,18 +93,30 @@ namespace Org.BouncyCastle.Utilities.Zlib public sealed override bool CanSeek { get { return false; } } public sealed override bool CanWrite { get { return false; } } - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (!closed) - { - closed = true; - input.Dispose(); - } - } - base.Dispose(disposing); - } +#if PORTABLE + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (closed) + return; + + closed = true; + Platform.Dispose(input); + } + base.Dispose(disposing); + } +#else + public override void Close() + { + if (closed) + return; + + closed = true; + Platform.Dispose(input); + base.Close(); + } +#endif public sealed override void Flush() {} |