Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GC.AllocateArray documentation #10142

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System/GC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The following example uses several GC methods to get generation and memory infor

## Remarks

If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.
In .NET 7 and earlier versions: If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.

]]></format>
</remarks>
Expand Down Expand Up @@ -255,7 +255,7 @@ If pinned is set to `true`, `T` must not be a reference type or a type that cont

## Remarks

If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.
In .NET 7 and earlier versions: If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.

Skipping zero-initialization is a security risk. The uninitialized array can contain invalid valuetype instances or sensitive information created by other parts of the application.
The code operating on uninitialized arrays should be heavily scrutinized to ensure that the uninitialized data is never read.
Expand Down