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:
parent
b934378758
commit
dae5c6cee4
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue