use UnmanagedCallersOnly for delegates

This commit is contained in:
Emmanuel Hansen
2025-02-22 22:46:29 -06:00
committed by KeatonTheBot
parent 1ea90c41a9
commit 7bf6c3f016
13 changed files with 648 additions and 665 deletions
+1 -6
View File
@@ -4,15 +4,10 @@ namespace ARMeilleure.Translation
{
class DelegateInfo
{
#pragma warning disable IDE0052 // Remove unread private member
private readonly Delegate _dlg; // Ensure that this delegate will not be garbage collected.
#pragma warning restore IDE0052
public IntPtr FuncPtr { get; }
public DelegateInfo(Delegate dlg, IntPtr funcPtr)
public DelegateInfo(IntPtr funcPtr)
{
_dlg = dlg;
FuncPtr = funcPtr;
}
}