1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 06:44:10 +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; mTarget = target;
mFuncPtr = ptr; 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 struct Function : int