L
Lev
Hi,
I have an unmanaged pointer to a class that I want to hold in a managed
class. I pass the pointer (from unmanaged code) in the constructor of the
managed class, and at that point it has value. It is stored in a member
variable in my managed class declared as MyObj __nogc* pMyObj. When I try to
retrieve it later, using a function declared as MyObj __nogc* GetObj, the
pointer has been corrupted and shows up as <undefined value> when inspecting
it from the debugger. How do I prevent that?
Thanks,
Lev
I have an unmanaged pointer to a class that I want to hold in a managed
class. I pass the pointer (from unmanaged code) in the constructor of the
managed class, and at that point it has value. It is stored in a member
variable in my managed class declared as MyObj __nogc* pMyObj. When I try to
retrieve it later, using a function declared as MyObj __nogc* GetObj, the
pointer has been corrupted and shows up as <undefined value> when inspecting
it from the debugger. How do I prevent that?
Thanks,
Lev