Update how-to-create-and-use-shared-ptr-instances.md - #5131
Conversation
Adjust some wrong description about shared_ptr
|
@Nowhere6 : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 8f4542d: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
Learn Build status updates of commit af22544: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Tyler Whitney (TylerMSFT)
left a comment
There was a problem hiding this comment.
Thank you for adding clarity around this scenario.
|
Learn Build status updates of commit e524ab0: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
|
#sign-off |
The old description about shared_ptr is wrong.
If we pass a raw ptr to a callee func, and use it to create a new shared_ptr, it's dangerous because callee will delete the resource where raw ptr pointed to.
Please accept this revision.
