summary refs log tree commit diff
path: root/crypto/src/util/zlib/ZInputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/zlib/ZInputStream.cs')
-rw-r--r--crypto/src/util/zlib/ZInputStream.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/crypto/src/util/zlib/ZInputStream.cs b/crypto/src/util/zlib/ZInputStream.cs
index d1e1ba160..671cf68b0 100644
--- a/crypto/src/util/zlib/ZInputStream.cs
+++ b/crypto/src/util/zlib/ZInputStream.cs
@@ -93,14 +93,18 @@ namespace Org.BouncyCastle.Utilities.Zlib
 		public sealed override bool CanSeek { get { return false; } }
 		public sealed override bool CanWrite { get { return false; } }
 
-		public override void Close()
-		{
-			if (!closed)
-			{
-				closed = true;
-				input.Close();
-			}
-		}
+	    protected override void Dispose(bool disposing)
+	    {
+	        if (disposing)
+	        {
+                if (!closed)
+                {
+                    closed = true;
+                    input.Dispose();
+                }
+	        }
+	        base.Dispose(disposing);
+	    }
 
 		public sealed override void Flush() {}