System::MakeObject method

System::MakeObject(Args&&…) method

Creates object on heap and returns shared pointer to it.

template<class T,class ...> std::enable_if<!IsSmartPtr<T>::value, SmartPtr<T>>::type System::MakeObject(Args &&... args)
ParameterDescription
TClass to instantiate.
ArgsConstructor arguments’ types.
ParameterTypeDescription
argsArgs&&…Constructor arguments.

ReturnValue

SmartPtr to newly created object, always in shared mode.

See Also

System::MakeObject(Args&&…) method

Creates object on heap and returns shared pointer to it.

template<class T,class ...> std::enable_if<IsSmartPtr<T>::value, T>::type System::MakeObject(Args &&... args)
ParameterDescription
TSmartPtr to class to instantiate.
ArgsConstructor arguments’ types.
ParameterTypeDescription
argsArgs&&…Constructor arguments.

ReturnValue

SmartPtr to newly created object, always in shared mode.

See Also