summary refs log tree commit diff
path: root/crypto/bzip2/src/CBZip2OutputStream.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-04 19:28:43 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-04 19:28:43 +0700
commitf56fc16973d66bd9461f247e50738e55bd54de7e (patch)
tree8e84c9bd2cfc2d554b99c8045ec46de7313410fc /crypto/bzip2/src/CBZip2OutputStream.cs
parentPort updated revocation test from Java (diff)
downloadBouncyCastle.NET-ed25519-f56fc16973d66bd9461f247e50738e55bd54de7e.tar.xz
Replace Close with Dispose for PORTABLE
Diffstat (limited to 'crypto/bzip2/src/CBZip2OutputStream.cs')
-rw-r--r--crypto/bzip2/src/CBZip2OutputStream.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/bzip2/src/CBZip2OutputStream.cs b/crypto/bzip2/src/CBZip2OutputStream.cs
index 73e6979d8..15e816f3a 100644
--- a/crypto/bzip2/src/CBZip2OutputStream.cs
+++ b/crypto/bzip2/src/CBZip2OutputStream.cs
@@ -386,6 +386,21 @@ namespace Org.BouncyCastle.Apache.Bzip2
 //            Close();
 //        }
 
+#if PORTABLE
+        protected override void Disposing(bool disposing)
+        {
+            if (disposing)
+            {
+                if (closed)
+                    return;
+
+                Finish();
+                closed = true;
+                Platform.Dispose(this.bsStream);
+            }
+            base.Dispose(disposing);
+        }
+#else
         public override void Close() {
             if (closed) {
                 return;
@@ -397,6 +412,7 @@ namespace Org.BouncyCastle.Apache.Bzip2
             base.Close();
             Platform.Dispose(this.bsStream);
         }
+#endif
 
         public void Finish() {
             if (finished) {