Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Remove leftover uses of DangerousGetPinnableReference#26037

Merged
ahsonkhan merged 2 commits into
dotnet:masterfrom
ahsonkhan:RemoveDanger
Dec 23, 2017
Merged

Remove leftover uses of DangerousGetPinnableReference#26037
ahsonkhan merged 2 commits into
dotnet:masterfrom
ahsonkhan:RemoveDanger

Conversation

@ahsonkhan
Copy link
Copy Markdown

@ahsonkhan ahsonkhan commented Dec 23, 2017

Part of:
https://github.com/dotnet/corefx/issues/25412
https://github.com/dotnet/corefx/issues/25615

Related to: #25936

Following the staging plan from here: https://github.com/dotnet/corefx/issues/23881#issuecomment-343767740

  • Add MemoryExtensions.GetReference/TryGetArray
  • Convert all uses of DangerousGetPinnableReference/DangerousTryGetArray in coreclr, corefx, corert, corefxlab, aspnet, ... to MemoryExtensions.GetReference
  • Change DangerousGetPinnableReference to whatever we like to make it fit the pinning pattern and remove DangerousTryGetArray.

Doing it this way will avoid the need for complex staging or things being on the floor for extensive periods of time.

cc @jkotas, @stephentoub, @KrzysztofCwalina

@ahsonkhan ahsonkhan merged commit f965141 into dotnet:master Dec 23, 2017
@ahsonkhan ahsonkhan deleted the RemoveDanger branch December 23, 2017 18:18
@karelz karelz added this to the 2.1.0 milestone Dec 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…26037)

* Remove leftover uses of DangerousGetPinnableReference

* Add reference to system.memory


Commit migrated from dotnet/corefx@f965141
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants