G
Guest
I apologize if this question has been asked before (I imagine it has). But,
I'd like a definitive response. Is it possible using C++/CLI to allocate a
(normally) managed reference type on the native heap?
That is, instead of using gcnew, and being subject to garabage collection,
could I use a native memory allocation routine like new(), with the result
being that the object is created on the native heap and not known by the
garbage collector? I would later deallocate storage myself. Everything I've
seen in scouring the web today suggests it can't be done (and it indeed
results in a compiler error when I try) but I thought I saw something at one
point that suggested it was possible...
Thanks,
Notre
I'd like a definitive response. Is it possible using C++/CLI to allocate a
(normally) managed reference type on the native heap?
That is, instead of using gcnew, and being subject to garabage collection,
could I use a native memory allocation routine like new(), with the result
being that the object is created on the native heap and not known by the
garbage collector? I would later deallocate storage myself. Everything I've
seen in scouring the web today suggests it can't be done (and it indeed
results in a compiler error when I try) but I thought I saw something at one
point that suggested it was possible...
Thanks,
Notre