B
bonk
I have a native class that has a managed private member:
private:
gcroot<MyManagedRefType^> m_managed;
Now at some point in time this member will eventually get initialized:
m_managed = gcnew MyManagedRefType();
How can test, wether this has already happend or not ? Without having to
catch the NullReferenceException (wich will be thrown if I try to access
Member of MyManagedRefType before the ctor was called).
if (m_managed)
if (m_managed != nullptr)
does not do the trick.
private:
gcroot<MyManagedRefType^> m_managed;
Now at some point in time this member will eventually get initialized:
m_managed = gcnew MyManagedRefType();
How can test, wether this has already happend or not ? Without having to
catch the NullReferenceException (wich will be thrown if I try to access
Member of MyManagedRefType before the ctor was called).
if (m_managed)
if (m_managed != nullptr)
does not do the trick.