Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: use make_shared for safe allocation
Using the reset does a double allocation and is error prone if some exception occured which is very unlikely but can happen. make_shared_ptr gives hedge over this and handle the failure in allocation. PR-URL: #37139 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information