My C# class creates and uses Managed C++ object that wraps (allocates and uses) unmanaged C++ objects and resources. The Managed C++ class correctly implements IDisposable with Destructor and Finalizer. Therefore, it appears that my C# class should also implement IDisposable. I want to follow correct IDisposable pattern in C# as well.
The following is unclear to me:
- Within Dispose method of my C# class, should I treat my Managed C++ objects as managed or unmanaged (since they rely on unmanaged resources internally)?