[c++] Smart Pointers

发布时间:2017-2-23 8:22:47 编辑: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的影响

下一篇:SQL SERVER 简介及应用 - 数据库系统原理