> I'm still confused with managed and unmanaged
OK.
> In VS2005, in the same project with /CLR switch on.
>
[quoted text clipped - 16 lines]
> My question is with UnmanagedClass umc; // So this creates a unmanaged
> object, on the unmanaged heep?
No. Unmanaged heap allocation requires that you use new. As you have written
it, umc resides on the stack.
> Does that mean all unmanged objects won't be moved
> around by GC?
Using C++/CLI, only objects allocated via gcnew reside on the managed heap.
The garbage collector only ever moves or collects objects on the managed
heap. Native objects are untouched.
Regards,
Will