什么是gcnew?gcnew

由网友(從頭洅唻)分享简介:我偶然发现了这个code和我太自豪地去问作者是什么意思。I stumbled across this code and am too proud to go and ask the author what it means.Hashtable^ tempHash = gcnew Hashtable(iterator...

我偶然发现了这个code和我太自豪地去问作者是什么意思。

I stumbled across this code and am too proud to go and ask the author what it means.

Hashtable^ tempHash = gcnew Hashtable(iterators_);

IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();

什么是 gcnew ,是多么重要它使用简单的新的,而不是? (我也难倒插入符号,我问那个在这里)

What is gcnew and how important is it to use that instead of simply new? (I'm also stumped by the caret; I asked about that over here.)

推荐答案

gcnew 是.NET参考对象;与gcnew创建的对象是自动垃圾回收;重要的是要使用gcnew与CLR类型

gcnew is for .NET reference objects; objects created with gcnew are automatically garbage-collected; it is important to use gcnew with CLR types

阅读全文

相关推荐

最新文章