Remove [FixedAddressValueType]. - #29
Conversation
Really? I use Obviously, GC and managed memory are the cat's meow, but for some cases, it's nice to have a permanent |
There is a better way to do this. Consider this code: using System;
public class C
{
public ReadOnlySpan<byte> Data => new byte[3] { 1, 2, 3 };
}It might seem that accessing This has worked with byte-sized values since quite some time and starting with dotnet/roslyn#61414 it can emit optimized code for arrays of bigger primitives. |
It has no effect for this use case and blocks the assembly from being loaded in unloadable
AssemblyLoadContexts.Fun fact: These were the only uses of this attribute on GitHub outside of .NET itself. 😅