I have a C++ unmanaged class NativeDog that needs to be used from C#, so I\'ve create a wrapper class ManagedDog.
NativeDog
ManagedDog
// unmanaged C++
You need a GC::KeepAlive() call in your FeedDogManaged function. Seems like it is an exact use case for that.
FeedDogManaged