I have a managed class which contains unmanaged class pointer:
class Managed { public IntPtr ptr; };
c++ function which takes a pointer as parameter:
void foo(void *ptr);
should i pin this Managed object before calling the unmanaged function?
calling code:
Managed obj = new Managed;
foo(obj.ptr);