mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
20 lines
437 B
C#
20 lines
437 B
C#
|
using System;
|
||
|
using System.Runtime.InteropServices;
|
||
|
|
||
|
namespace ARMeilleure.Translation
|
||
|
{
|
||
|
sealed class DelegateInfo
|
||
|
{
|
||
|
private readonly Delegate _dlg; // Ensure that this delegate will not be garbage collected.
|
||
|
|
||
|
public IntPtr FuncPtr { get; }
|
||
|
|
||
|
public DelegateInfo(Delegate dlg)
|
||
|
{
|
||
|
_dlg = dlg;
|
||
|
|
||
|
FuncPtr = Marshal.GetFunctionPointerForDelegate<Delegate>(dlg);
|
||
|
}
|
||
|
}
|
||
|
}
|