There’s a thread on the forum requesting that all of these functions that return pointers and expect the caller to take ownership of the pointer should be changed to return std::unique_ptr.
you can chime in here: Expressing Ownership Transfer of pointers in function signatures
