System::MakeObject 方法

System::MakeObject(Args&&…) method

在堆上创建对象并返回指向它的共享指针。

template<class T,class ...> std::enable_if<!IsSmartPtr<T>::value, SmartPtr<T>>::type System::MakeObject(Args &&... args)
参数描述
T要实例化的类。
参数构造函数参数的类型。
参数类型描述
argsArgs\&&…构造函数参数。

ReturnValue

SmartPtr to newly created object, always in shared mode.

另见

System::MakeObject(Args&&…) method

在堆上创建对象并返回指向它的共享指针。

template<class T,class ...> std::enable_if<IsSmartPtr<T>::value, T>::type System::MakeObject(Args &&... args)
参数描述
TSmartPtr 到要实例化的类。
参数构造函数参数的类型。
参数类型描述
argsArgs\&&…构造函数参数。

ReturnValue

SmartPtr to newly created object, always in shared mode.

另见