Skip to content

Commit

Permalink
Dispose of class.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Oct 29, 2024
1 parent 4999e8d commit 5ccc4c7
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/IKVM.Runtime/ClassFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ sealed partial class ClassFile : IDisposable
readonly BootstrapMethod[] bootstrapMethods;
readonly TypeAnnotationTable runtimeVisibleTypeAnnotations = TypeAnnotationTable.Empty;

bool disposed;

#if IMPORTER

/// <summary>
Expand Down Expand Up @@ -1259,21 +1261,10 @@ private static bool HasExceptionHandlerInRegion(Method.ExceptionTableEntry[] ent
return false;
}

/// <summary>
/// Dispses of the instance.
/// </summary>
/// <inheritdoc />
public void Dispose()
{
clazz.Dispose();
GC.SuppressFinalize(this);
}

/// <summary>
/// Finalizes the instance.
/// </summary>
~ClassFile()
{
Dispose();
}

}
Expand Down

0 comments on commit 5ccc4c7

Please sign in to comment.