<memory>(包括了auto_ptr,shared_ptr等各种指针)
This header defines general utilities to manage dynamic memory:
Allocators
- allocator
- Default allocator (class template )
- allocator_arg
- Allocator arg (object )
- allocator_arg_t
- Allocator arg type (class )
- allocator_traits
- Allocator traits (class template )
Managed pointers
- auto_ptr
- Automatic Pointer [deprecated] (class template )
- auto_ptr_ref
- Reference to automatic pointer (class template )
- shared_ptr
- Shared pointer (class template )
- weak_ptr
- Weak shared pointer (class template )
- unique_ptr
- Unique pointer (class template )
- default_delete
- Default deleter (class template )
Functions and classes related to shared_ptr:
- make_shared
- Make shared_ptr (function template )
- allocate_shared
- Allocate shared_ptr (function template )
- static_pointer_cast
- Static cast of shared_ptr (function template )
- dynamic_pointer_cast
- Dynamic cast of shared_ptr (function template )
- const_pointer_cast
- Const cast of shared_ptr (function template )
- get_deleter
- Get deleter from shared_ptr (function template )
- owner_less
- Owner-based less-than operation (class template )
- enable_shared_from_this
- Enable shared_from_this (class template )
Uninitialized memory
Raw storage iterator:
- raw_storage_iterator
- Raw storage iterator (class template )
Temporary buffers:
- get_temporary_buffer
- Get block of temporary memory (function template )
- return_temporary_buffer
- Return block of temporary memory (function template )
Specialized algorithms:
- uninitialized_copy
- Copy block of memory (function template )
- uninitialized_copy_n
- Copy block of memory (function template )
- uninitialized_fill
- Fill block of memory (function template )
- uninitialized_fill_n
- Fill block of memory (function template )
Memory model
- pointer_traits
- Pointer traits (class template )
- pointer_safety
- Pointer safety enum (enum class )
- declare_reachable
- Declare pointer as reachable (function )
- undeclare_reachable
- Undeclare pointer as reachable (function template )
- declare_no_pointers
- Declare memory block as containing no pointers (function )
- undeclare_no_pointers
- Undeclare memory block as containing no pointers (function )
- get_pointer_safety
- Get pointer safety (function )
- align
- Align in range (function )
- addressof
- Address of object or function (function template )
http://www.cplusplus.com/reference/memory/
<memory>(包括了auto_ptr,shared_ptr等各种指针)的更多相关文章
- auto_ptr,shared_ptr 智能指针的使用
Q: 那个auto_ptr是什么东东啊?为什么没有auto_array?A: 哦,auto_ptr是一个很简单的资源封装类,是在<memory>头文件中定义的.它使用“资源分配即初始化”技 ...
- C++智能指针: auto_ptr, shared_ptr, unique_ptr, weak_ptr
本文参考C++智能指针简单剖析 内存泄露 我们知道一个对象(变量)的生命周期结束的时候, 会自动释放掉其占用的内存(例如局部变量在包含它的第一个括号结束的时候自动释放掉内存) int main () ...
- C++11 shared_ptr(智能指针)详解
要确保用 new 动态分配的内存空间在程序的各条执行路径都能被释放是一件麻烦的事情.C++ 11 模板库的 <memory> 头文件中定义的智能指针,即 shared _ptr 模板,就是 ...
- std::shared_ptr 和普通指针的转换
相互转化见示例 struct test { int num; string name; }; test* pTest = new test(); std::shared_ptr<test> ...
- 智能指针auto_ptr & shared_ptr
转载:智能指针auto_ptr 很多人听说过标准auto_ptr智能指针机制,但并不是每个人都天天使用它.这真是个遗憾,因为auto_ptr优雅地解决了C++设计和编码中常见的问题,正确地使用它可以生 ...
- C++ Primer : 第十二章 : 动态内存之shared_ptr类
在C++中,动态内存是的管理是通过一对运算符来完成的:new ,在动态内存中为对象分配空间并返回一个指向该对象的指针,delete接受一个动态对象的指针,销毁该对象,并释放该对象关联的内存. 动态内 ...
- c++智能指针(unique_ptr 、shared_ptr、weak_ptr、auto_ptr)
一.前序 什么是智能指针? ——是一个类,用来存储指针(指向动态分配对象也就是堆中对象的的指针). c++的内存管理是让很多人头疼的事,当我们写一个new语句时,一般就会立即把delete语句直接也写 ...
- auto_ptr, unique_ptr, shared_ptr and weak_ptr智能指针讲解
笔者介绍:姜雪伟,IT公司技术合伙人,IT高级讲师,CSDN社区专家,特邀编辑,畅销书作者,已出版书籍:<手把手教你架构3D游戏引擎>电子工业出版社和<Unity3D实战核心技术详解 ...
- C++ 智能指针 auto_ptr 和 shared_ptr
首先,如果你不知道什么是智能指针,请先移步:C++智能指针简单剖析 1.auto_ptr #ifndef AUTO_PTR_H #define AUTO_PTR_H template<typen ...
随机推荐
- unity 美术注意事项
有时候美术的一个不小心,就会给程序徒增极大的工作量,所以在项目开始之前是有必要和美术沟通一下,来规范一些东西, 1.将单体模型的轴心置中. 2.模型有父物体时,子物体应相对于父物体的(0,0,0)位置 ...
- ActiveMQ学习总结(8)——消息队列设计精要
消息队列已经逐渐成为企业IT系统内部通信的核心手段.它具有低耦合.可靠投递.广播.流量控制.最终一致性等一系列功能,成为异步RPC的主要手段之一. 当今市面上有很多主流的消息中间件,如老牌的Activ ...
- 【转】 HTML解析:基于XPath的C#类库HtmlAgiliytyPack
[转] HTML解析:基于XPath的C#类库HtmlAgiliytyPack 最近处于毕业设计开始阶段,前期工作需要去国外的一些专业数据库网站比对一些所需TF家族信息,为了快捷方便,想到用程序去帮助 ...
- django-xadmin定制之列表页searchbar placeholder
环境:xadmin-for-python3 python3.5.2 django1.9.12 列表页的searchbar如果提供的可搜索字段,都没提示哪个字段可搜索,很不友好,本次定制主要增加inpu ...
- hdu 3068 最长回文 【Manacher求最长回文子串,模板题】
欢迎关注__Xiong的博客: http://blog.csdn.net/acmore_xiong?viewmode=list 最长回文 ...
- 在Unix上用 BIND建立名称服务器(naem server)
在Unix上用 BIND建立名称服务器(naem server) 安装 apt install -y bind9 yum install -y bind bind-utils 下载源码并解压缩,htt ...
- dubbo+zookeeper+springMVC +maven
pom: <dependency> <groupId>com.github.sgroschupf</grou ...
- Sqoop 的基本架构
不多说,直接上干货! Sqoop 的基本架构图 注意: Sqoop,只需map task就可以了,因为,它只是做数据传输,不需做数据处理.
- Android程序测试
一.建立测试环境 安装了Android Developer Tools (ADT) 插件的Eclipse将为你创建,构建,以及运行Android程序提供一个基于图形界面的集成开发环境.Eclipse的 ...
- box-shadow制作各种单边,多边阴影
一.box-shadow问题探究 box-shadow 在MDN定义以及详解: box-shadow 以由逗号分隔的列表来描述一个或多个阴影效果.该属性让你可以对几乎所有元素的边框产生阴影.如果元素同 ...