MakeShared

Function Usage

This function uses std::make_shared to create an object. If the object fails to be created, a null pointer is returned.

Prototype

template<typename T, typename... Args>
static std::shared_ptr<T> MakeShared(Args && ... args);

Parameter Description

Parameter

Input/Output

Description

T

Input

Object class name.

args

Input

Constructor parameter of the created T-type object.

Return Parameter Description

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.