Restriction of Managed Types

E

Edward Diener

In the MSDN topic for MC++ "Restriction of Managed Types", I read that GC
and value types "cannot contain pointers to other managed types ". That
can't be right. Does it really mean to say that a __gc class can not have a
pointer to an object of another __gc class ? I must be missing something in
the documentation, but OOP programming as I know it would end if a class
couldn't have a pointer to an object of another class. What have I missed
here in the explanation ?
 
D

Doug Harrison [MVP]

Edward said:
In the MSDN topic for MC++ "Restriction of Managed Types", I read that GC
and value types "cannot contain pointers to other managed types ". That
can't be right. Does it really mean to say that a __gc class can not have a
pointer to an object of another __gc class ? I must be missing something in
the documentation, but OOP programming as I know it would end if a class
couldn't have a pointer to an object of another class. What have I missed
here in the explanation ?

You're talking about this:

http://msdn.microsoft.com/library/d...cmex/html/vclrfrestrictionsofmanagedtypes.asp

I'm not sure what the article meant to say, but your instincts are correct.
What it says is wrong.
 
R

Ronald Laeremans [MSFT]

Yes, I agree. I'll get the topic fixed.

Thanks for the catch.

Ronald Laeremans
Visual C++ team
 
E

Edward Diener

Ronald said:
Yes, I agree. I'll get the topic fixed.

Thanks for the catch.

No problem. As a C++ programmer, I am trying to learn MC++ programming and
it surely couldn't be correct.
 
R

Ronald Laeremans [MSFT]

BTW, second guessing what we did mean, the most likely explanation is that
we meant to say "interior pointer". Which would have made the statement
correct.

Ronald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top