S
Slawomir Lisznianski
Do ref classes indeed support instantiation on the stack? Similarly, can
native classes be instantiated on gc heap?
When you try to have a ref class instance on the stack, you'll get:
R : cannot use this type here without a top-level '^'.
When you try to instantiate a native class using gcnew using Visual
Studio 2005 Beta 1, you'll get:
error C2726: 'gcnew' may only be used to create an object with managed type.
I was going through the C++/CLI Language Specification Working Draft
1.5, Jun, 2004, and nowhere I could find a clause that would make me
believe that managed types are allowed to go on the stack or native heap.
I've read articles, such as this one
http://www.codeguru.com/Csharp/.NET/net_general/visualstudionetadd-ins/article.php/c7405/
that makes all sorts of claims regarding support for deterministic
destruction for managed types. Where is it mentioned in the C++/CLI draft?
Regards,
Slawomir Lisznianski [ www.rhapsodia.org ]
native classes be instantiated on gc heap?
When you try to have a ref class instance on the stack, you'll get:
R : cannot use this type here without a top-level '^'.
When you try to instantiate a native class using gcnew using Visual
Studio 2005 Beta 1, you'll get:
error C2726: 'gcnew' may only be used to create an object with managed type.
I was going through the C++/CLI Language Specification Working Draft
1.5, Jun, 2004, and nowhere I could find a clause that would make me
believe that managed types are allowed to go on the stack or native heap.
I've read articles, such as this one
http://www.codeguru.com/Csharp/.NET/net_general/visualstudionetadd-ins/article.php/c7405/
that makes all sorts of claims regarding support for deterministic
destruction for managed types. Where is it mentioned in the C++/CLI draft?
Regards,
Slawomir Lisznianski [ www.rhapsodia.org ]