src: use smart pointer instead of new and delete
Use an std::unique_ptr for variables that are deleted right after creation. Since the destructor of InspectorTimer is private but needed by the unique_ptr, define deleter_type as friend. PR-URL: https://github.com/nodejs/node/pull/17020 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
parent
c661dad0
Please register or sign in to comment