Bronek Kozicki wrote:
> just a question: is it possible to gcnew a C++ type (that is the one
> with C++ semantics, defined without use of C++/CLI keywords)?
This question was asked many times earlier. I found a blog post by
Sutter explaining this here:
http://pluralsight.com/blogs/hsutter/archive/2004/10/14.aspx
Of particular interest is this statement:
"In C++/CLI, GC-ness is per object. Now, we didn't get to implementing
all of it in this first round: In the version now in beta you can
already put an object of any type on the stack, but you can only
__gcnew a managed type__ and you can only __new a native type__. But
the hooks are there, and intentionally so: After this release, we
definitely intend to allow gcnew of any type (including native types,
so that you will get GC for native objects too, at the usually minor
cost of an under-the-covers proxy) and new of any type (including CLI
types)."
This post was around 10/2004 -- I have no idea if C++/CLI that was
released along with .NET 2.0 around 11/2005 allows you to instantiate a
native C++ type with gcnew.
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|