Skip to content

Commit

Permalink
fix changkun#34, language preciseness
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Jun 7, 2018
1 parent e705ef8 commit db45392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/zh-cn/05-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ int main() {
在上图中,最后一步只剩下 B,而 B 并没有任何智能指针引用它,因此这块内存资源也会被释放。
`std::weak_ptr` 没有 `*` 运算符和 `->` 运算符,所以不能够对资源进行操作,它的唯一作用就是用于检查 `std::shared_ptr` 是否存在,`expired()` 方法在资源未被释放时,会返回 `true`,否则返回 `false`。
`std::weak_ptr` 没有 `*` 运算符和 `->` 运算符,所以不能够对资源进行操作,它的唯一作用就是用于检查 `std::shared_ptr` 是否存在,`expired()` 方法能在资源未被释放时,会返回 `true`,否则返回 `false`。
## 总结
Expand Down

0 comments on commit db45392

Please sign in to comment.