diff options
Diffstat (limited to 'crypto/src/openpgp/WrappedGeneratorStream.cs')
-rw-r--r-- | crypto/src/openpgp/WrappedGeneratorStream.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/src/openpgp/WrappedGeneratorStream.cs b/crypto/src/openpgp/WrappedGeneratorStream.cs index 6fc7329af..9fe2e33d7 100644 --- a/crypto/src/openpgp/WrappedGeneratorStream.cs +++ b/crypto/src/openpgp/WrappedGeneratorStream.cs @@ -17,9 +17,13 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp this.gen = gen; } - public override void Close() - { - gen.Close(); - } + protected override void Dispose(bool disposing) + { + if (disposing) + { + gen.Close(); + } + base.Dispose(disposing); + } } } |