shared_ptr解引用
时间: 2023-09-09 10:06:19 浏览: 89
shared_ptr解引用是指通过shared_ptr指针访问所指向的对象。当shared_ptr指针不为空且指向有效对象时,可以使用解引用操作符(*)来访问该对象的成员或执行相应的操作。解引用shared_ptr指针可以使我们像操作普通指针一样操作共享的资源,而无需手动管理内存释放。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [C++基础之内存管理(一)指针——shared_ptr详解](https://blog.csdn.net/itlilyer/article/details/108444937)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Th5.3:智能指针(shared_ptr)之详述](https://blog.csdn.net/weixin_44980842/article/details/121706305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文