Forum Discussion

BuaChuan's avatar
BuaChuan
Copper Contributor
Nov 09, 2022

Memory<T> How to wrap references unmanaged memory?

Span<T> can pass void* through the constructor to refer to unmanaged Memory, but what about Memory<T>? I didn't find a Mothod to do that.  IMemoryOwner<T> contains an property of type Memory<T>. If Memory<T> could wrap references to managed or unmanaged memory, it would be more generic, wouldn't it?

Resources