Skip to content

Commit 4bba203

Browse files
nxtnmairaw
authored andcommitted
Update GetFunctionPointerForDelegate docs (#3706)
1 parent 4aae924 commit 4bba203

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Runtime.InteropServices/Marshal.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,7 @@
35973597
<format type="text/markdown"><![CDATA[
35983598

35993599
## Remarks
3600-
The delegate `d` is converted to a function pointer that can be passed to unmanaged code using the [__stdcall](/cpp/cpp/stdcall) calling convention. You can set the calling convention by applying the <xref:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute> to the delegate.
3600+
The delegate `d` is converted to a function pointer that can be passed to unmanaged code using the [__stdcall](/cpp/cpp/stdcall) calling convention on Windows, or the [__cdecl](/cpp/cpp/cdecl) calling convention on Linux and macOS. You can set the calling convention by applying the <xref:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute> to the delegate.
36013601

36023602
You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code.
36033603

@@ -3661,7 +3661,7 @@
36613661
<format type="text/markdown"><![CDATA[
36623662

36633663
## Remarks
3664-
The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using the [__stdcall](/cpp/cpp/stdcall) calling convention. You can set the calling convention by applying the <xref:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute> to the delegate.
3664+
The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using the [__stdcall](/cpp/cpp/stdcall) calling convention on Windows, or the [__cdecl](/cpp/cpp/cdecl) calling convention on Linux and macOS. You can set the calling convention by applying the <xref:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute> to the delegate.
36653665

36663666
You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code.
36673667

0 commit comments

Comments
 (0)