I am looking at the use of System.Runtime.InteropServices.MemoryMarshal.GetReference()
in the dotnet runtime repository, and I don't see any explicit pinning of the obtained references being done. Which suggests that maybe the object we have obtained a ref on has been pinned, or the reference is updated when the GC moves the object.
It looks to me that the ref must be being updated, but I am not sure, and can't find any documentation on this.
Here's the class I am looking at: