Recover containing GC object from managed 'ref' interior pointer
This question is newly relevant in light of the new ref locals and ref return features in the latest versions of C# 7 : With the increased prominence and wider use of managed--or "interior"--pointer variables in C#, occasionally you may need to recover the respective containing Pinnable GC object for such a pointer. For example, if you are passing around a managed pointer to an array element of type T , you might need the array reference T[] itself in order to call (e.g.) Array.Copy(...) . So, from managed code, is there any reasonably legitimate way to recover the containing GC object handle,