What is gcnew?

后端 未结 3 1563
情书的邮戳
情书的邮戳 2020-12-08 13:18

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

Hashtable^ tempHash = gcnew Hashtable(iterators_);

IDictionaryEnumerato         


        
3条回答
  •  长情又很酷
    2020-12-08 13:44

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

提交回复
热议问题