Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d9f76f commit 1325f59Copy full SHA for 1325f59
src/runtime/nativecall.cs
@@ -45,8 +45,8 @@ internal static T GetDelegate<T>(IntPtr fp) where T: Delegate
45
Delegate d = null;
46
if (!Interop.allocatedThunks.TryGetValue(fp, out d))
47
{
48
- // Use Marshal.GetDelegateForFunctionPointer<> directly after upgrade the framework
49
- d = Marshal.GetDelegateForFunctionPointer(fp, typeof(T));
+ // We don't cache this delegate because this is a pure delegate ot unmanaged.
+ d = Marshal.GetDelegateForFunctionPointer<T>(fp);
50
}
51
return (T)d;
52
0 commit comments