_GC pointers [modified]
-
I am unable to understand the gc concept of the mc++, as per the example for managed pointers in mc++ using gc there is no any proper explanation, i am putting the code, if someone is able to explain it, i will be thankful to you. __gc struct G { int i; }; __value struct V { int i; }; int main() { // defaults to V __gc * __nogc * ppV; V ** ppV; // defaults to V __gc * __nogc * __nogc * pppV; V *** pppV; // defaults to G __gc * __gc * ppG; G ** ppG; // defaults to G __gc * __gc * __nogc * pppG; G *** pppG; // defaults to G __gc * __gc * __nogc * __nogc * ppppG; G **** ppppG; } my question is : why there are only two _gc's for the garbage collected why not all are garbage collected, or what is the advantage of _gc pointer coming for one time and coming for two times, can anyone explain me? -- modified at 5:15 Tuesday 15th May, 2007
Thanks, Syed
-
I am unable to understand the gc concept of the mc++, as per the example for managed pointers in mc++ using gc there is no any proper explanation, i am putting the code, if someone is able to explain it, i will be thankful to you. __gc struct G { int i; }; __value struct V { int i; }; int main() { // defaults to V __gc * __nogc * ppV; V ** ppV; // defaults to V __gc * __nogc * __nogc * pppV; V *** pppV; // defaults to G __gc * __gc * ppG; G ** ppG; // defaults to G __gc * __gc * __nogc * pppG; G *** pppG; // defaults to G __gc * __gc * __nogc * __nogc * ppppG; G **** ppppG; } my question is : why there are only two _gc's for the garbage collected why not all are garbage collected, or what is the advantage of _gc pointer coming for one time and coming for two times, can anyone explain me? -- modified at 5:15 Tuesday 15th May, 2007
Thanks, Syed
I don't have an answer for you, but to keep it on-topic, this confusing overloading of the meaning of
*
was a major flaw in MC++, and it's been fixed in C++/CLI by denoting GC handles with^
instead.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Dunder-Mifflin, this is Pam.