1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed GC issue

This commit is contained in:
Brian Fiete 2019-10-05 10:25:07 -07:00
parent b934378758
commit dae5c6cee4

View file

@ -31,6 +31,12 @@ namespace System
mTarget = target;
mFuncPtr = ptr;
}
protected override void GCMarkMembers()
{
// Note- this is safe even if mTarget is not an object, because the GC does object address validation
GC.Mark(Internal.UnsafeCastToObject(mTarget));
}
}
struct Function : int