C# function pointers causes access violation upon calling from C++
In the following bit of code I’m using C# function pointers to omit using a delegate type, for faster performance. The code works fine when I use a delegate type marshalled as a function pointer, no exception no issues. However when changing it from a delegate to a function pointer it sometimes throws an access violation.