2020年8月12日
摘要: 本文主要介绍: shared_ptr中为什么需要enable_shared_from_this 这个基类,以及shared_ptr中是如何实现这个功能的。代码中如何实现。 问题1: 代码中为什么需要enable_shared_from_this 这个基类。在类对象内部需要生成一个共享指针;如下: # 阅读全文
posted @ 2020-08-12 00:04 xgcode 阅读(285) 评论(0) 推荐(0) 编辑