Skip to content

Commit 2e48c74

Browse files
committed
fix(gc): harden finalizer search
1 parent 4a4ce64 commit 2e48c74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Il2CppInterop.Runtime/Injection/ClassInjector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void InternFinalizerChain(Type? type)
236236
break;
237237
}
238238

239-
if (type.GetMethod("Il2CppFinalize", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly) is MethodInfo m)
239+
if (type.GetMethod("Il2CppFinalize", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly, new Type[0]) is MethodInfo m)
240240
{
241241
next = new(m.CreateDelegate(typeof(Action<>).MakeGenericType(type)), last);
242242
if (last != null) last.next = next;

0 commit comments

Comments
 (0)