diff --git a/src/runtime/graph_executor/graph_executor.cc b/src/runtime/graph_executor/graph_executor.cc index ad5b99e06c7e..1084b4ee3ec4 100644 --- a/src/runtime/graph_executor/graph_executor.cc +++ b/src/runtime/graph_executor/graph_executor.cc @@ -267,10 +267,10 @@ void GraphExecutor::DefaultLookupLinkedParam(TVMArgs args, TVMRetValue* rv) { std::vector shape_vec{template_tensor->shape, template_tensor->shape + template_tensor->ndim}; - std::unique_ptr container{new NDArray::Container( - static_cast(opaque_handle), shape_vec, template_tensor->dtype, dev)}; + auto* container = new NDArray::Container(static_cast(opaque_handle), shape_vec, + template_tensor->dtype, dev); container->SetDeleter(GraphExecutor::LinkedNDArrayDeleter); - *rv = NDArray(GetObjectPtr(container.release())); + *rv = NDArray(GetObjectPtr(container)); } void GraphExecutor::SetupStorage() {