summary refs log tree commit diff
path: root/crypto/src/asn1/x509
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-03-10 13:28:46 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-03-10 13:28:46 +0700
commit9995dc06402d6dbe33862c151eab6150c4de14e5 (patch)
treec3c1ab51a7cdd8bbbda6d14411900ddea4666fab /crypto/src/asn1/x509
parentRemove unnecessary methods (diff)
downloadBouncyCastle.NET-ed25519-9995dc06402d6dbe33862c151eab6150c4de14e5.tar.xz
Refactor IDisposable implementations
Diffstat (limited to 'crypto/src/asn1/x509')
-rw-r--r--crypto/src/asn1/x509/TBSCertList.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/src/asn1/x509/TBSCertList.cs b/crypto/src/asn1/x509/TBSCertList.cs
index 2b288850f..009773e79 100644
--- a/crypto/src/asn1/x509/TBSCertList.cs
+++ b/crypto/src/asn1/x509/TBSCertList.cs
@@ -97,7 +97,7 @@ namespace Org.BouncyCastle.Asn1.X509
 				return new RevokedCertificatesEnumerator(en.GetEnumerator());
 			}
 
-			private class RevokedCertificatesEnumerator
+			private sealed class RevokedCertificatesEnumerator
 				: IEnumerator<CrlEntry>
 			{
 				private readonly IEnumerator<Asn1Encodable> e;
@@ -107,11 +107,13 @@ namespace Org.BouncyCastle.Asn1.X509
 					this.e = e;
 				}
 
-				public virtual void Dispose()
+				public void Dispose()
 				{
-				}
+					e.Dispose();
+                    GC.SuppressFinalize(this);
+                }
 
-				public bool MoveNext()
+                public bool MoveNext()
 				{
 					return e.MoveNext();
 				}