ref class MyDataClass { public: static Stuff::Manager^ m_Manager; /// ... }
void f() { Stuff::Manager^ manager = GetManager(); MyDataClass::m_Manager = manager; // Is this a transfer of ownership or just a copy ? or will manager be destroy by the scope ? } void g() { MyDataClass::m_Manager->DoSomething(); } int Main() { f(); g(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)