1 files changed, 16 insertions, 3 deletions
diff --git a/crypto/src/util/zlib/ZInflaterInputStream.cs b/crypto/src/util/zlib/ZInflaterInputStream.cs
index 5a3ff5aa6..ef742bb00 100644
--- a/crypto/src/util/zlib/ZInflaterInputStream.cs
+++ b/crypto/src/util/zlib/ZInflaterInputStream.cs
@@ -114,10 +114,23 @@ namespace Org.BouncyCastle.Utilities.Zlib {
public override void WriteByte(byte b) {
}
- public override void Close() {
- inp.Close();
+#if PORTABLE
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ Platform.Dispose(inp);
+ }
+ base.Dispose(disposing);
}
-
+#else
+ public override void Close()
+ {
+ Platform.Dispose(inp);
+ base.Close();
+ }
+#endif
+
public override int ReadByte() {
if(Read(buf1, 0, 1)<=0)
return -1;
|