[c++] Smart Pointers

发布时间:2017-1-19 10:27:17 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"[c++] Smart Pointers ",主要涉及到[c++] Smart Pointers 方面的内容,对于[c++] Smart Pointers 感兴趣的同学可以参考一下。

return 0;
}
View Code

Lifetime: the period of time in which memory is allocated for an object

Different kinds of objects:

  • Static objects: allocated in a global (static) area
  • Local (or automatic or stack) objects
  • Heap objects

Named objects: (named by the programmer): their lifetimes determined by their scope

Heap objects (unnamed objects): their lifetimes determined by the programmer

  • Local Objects - 大括号的重要性

  • const对lifetime的影响

上一篇:mybatis中的查询缓存

相关文章

相关评论