From 5ccc4c7e61117359f88ddcac3f6392e4fefd3211 Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Mon, 28 Oct 2024 22:53:17 -0500 Subject: [PATCH] Dispose of class. --- src/IKVM.Runtime/ClassFile.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/IKVM.Runtime/ClassFile.cs b/src/IKVM.Runtime/ClassFile.cs index 7b1067d74..69b3d0cad 100644 --- a/src/IKVM.Runtime/ClassFile.cs +++ b/src/IKVM.Runtime/ClassFile.cs @@ -68,6 +68,8 @@ sealed partial class ClassFile : IDisposable readonly BootstrapMethod[] bootstrapMethods; readonly TypeAnnotationTable runtimeVisibleTypeAnnotations = TypeAnnotationTable.Empty; + bool disposed; + #if IMPORTER /// @@ -1259,21 +1261,10 @@ private static bool HasExceptionHandlerInRegion(Method.ExceptionTableEntry[] ent return false; } - /// - /// Dispses of the instance. - /// + /// public void Dispose() { clazz.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Finalizes the instance. - /// - ~ClassFile() - { - Dispose(); } }