C++ Wrapper and Correctly Disposing Unmanaged Resources using ArrayHandle
What don't you like about it? There's a very small space where a C++ exception could occur leaking the vector memory. If the ExrDepthMapExtractor or extractDepthMap throws, there's no way to clean the vector memory. You could just put something in the catch block. 

You could memcpy the pixel memory from C++ to C# instead of looping. Or share memory the other direction, by pinning it and having the C++ side write into the provided memory. That's nice because it allows the garbage collector safely deal with the memory, but requires safeguards to prevent .NET from doing anything to the memory while C++ is using it.