anomalous
unmanaged struct issue
Do have experience if in c# casting nint pointers to other pointer types is bad? Like I want to allocate an unmanaged struct. And I just cast the nint pointer returned by NativeMemory / Marshal to T*. Should I be using Span<T> instead?
because I read casting to different types will return more or less data on dereference than I'd want. And I cast the pointer to the memory a lot
4 replies