Skip to content

Merge main into live#12367

Merged
dotnet-policy-service[bot] merged 1 commit intolivefrom
main
Mar 4, 2026
Merged

Merge main into live#12367
dotnet-policy-service[bot] merged 1 commit intolivefrom
main

Conversation

@dotnet-policy-service
Copy link
Contributor

Please don't squash-merge this PR.

…2365)

* Add GC.KeepAlive example to GetFunctionPointerForDelegate docs

The existing remarks say to keep the delegate from being collected but
don't show how. Add a concrete code example using GC.KeepAlive, and
explain when a static field is needed for persistent callbacks.

Applies to both the non-generic and generic overloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update xml/System.Runtime.InteropServices/Marshal.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update xml/System.Runtime.InteropServices/Marshal.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@dotnet-policy-service dotnet-policy-service bot merged commit 4b58b34 into live Mar 4, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant