In C ++ / CLI, you can use native types in a managed class, so you are not allowed to hold a member of the native class in a managed class: in this case, you need to use pointers.
Here is an example:
class NativeClass { .... }; public ref class ManagedClass { private: NativeClass mNativeClass;
Does anyone know about the equivalent of shared_ptr in the C ++ / CLI world?
Edit: Thank you for your offer of "1800-Information." Following your suggestion, I checked STL.Net, but it is only available with Visual Studio 2008, and it provides containers + algorithms, but without smart pointers.
smart-pointers auto-ptr c ++ - cli
Pascal T.
source share