有关在C ++/CLI中使用CLR类型的问题 [英] Question about using CLR types with C++/CLI

查看:158
本文介绍了有关在C ++/CLI中使用CLR类型的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我会在C#和.NET框架中发展了几年之后,通过涉足C ++/CLI来访问C ++.

我的问题是:为什么有必要通过使用^运算符将一个对象显式标记为CLR对象,因为无论如何这些类型都不使用指针(*)表示法?

以我对C ++/CLI的有限了解,对我来说有意义的是,任何带有*的都必须手动删除,而没有*的任何东西都不应涉及(当然有些例外).

简单的解释?

谢谢

I thought I would pay my old roots in C++ a visit by dabbling in C++/CLI after several years of development in C# and .NET framework.

My question is: Why is it necessary to explicitly mark an object as being a CLR object by using the ^ operator since pointer (*) notation isn't used for those types anyway?

With my limited knowledge of the C++/CLI, it would make sense to me that anything with a * must be deleted manually, anything without it should not be concerned with (some exceptions apply, of course).

Simple explanation?

Thanks

推荐答案


这篇关于有关在C ++/CLI中使用CLR类型的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆