lil_big_doot
Is it possible to pin an array using reflection?
I have an interpreter I'm working on and I'd like to support some usage of pointers, but right now all .NET interop is based on reflection or calls to functions I've defined ahead of time. As far as I can tell there's not a way for me to pin an array through a reflection call, but I want to avoid emitting a dynamic method because that won't work on iOS/AOT
Alternatively I was thinking maybe there's a way I can pin the array without using fixed so then the duration of the pin is managed manually by me? Not sure if there's something like GCHandle that can help me out here
3 replies