<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 ...
随机推荐
- Android插件实例——360 DroidPlugin具体解释
在中国找到钱不难,但你的一个点子不意味着是一个创业.你谈一个再好的想法,比方我今天谈一个创意说,新浪为什么不收购GOOGLE呢?这个创意非常好.新浪一收购GOOGLE.是不是新浪就变成老大了?你从哪儿 ...
- 百度地图SDK for Android【Demo兴趣点搜索】
百度地图SDK为开发人员提供了便捷的检索服务. 今天我将为大家介绍Poi检索相关的内容. 首先,我们要构建一个最主要的地图应用.详细介绍请參考:百度地图SDK for Android[ ...
- HIT 2255 Not Fibonacci(矩阵高速幂)
#include <iostream> #include <cstdio> #include <cstring> using namespace std; cons ...
- 学password学一定得学程序
题目描写叙述 以前.ZYJ同学非常喜欢password学.有一天,他发现了一个非常长非常长的字符串S1.他非常好奇那代表着什么,于是奇妙的WL给了他还有一个字符串S2.可是非常不幸的是,WL忘记跟他说 ...
- vue18 动画
<!-- bower-> (前端)包管理器 npm install bower -g 验证: bower --version bower install <包名> bower ...
- 8.不绑定(ngNonBindable)
转自:https://www.cnblogs.com/best/tag/Angular/ ngNonBindable指令告诉Angular编译或绑定当前DOM元素的内容.这对于要求Angular忽略那 ...
- centos7 双网卡设置(先NAT和后桥接)
摘要:VMware中搭建一台虚拟机192.168.161.5(NAT转发) 首先在VM虚拟机设置里面添加一块网卡适配器 设置为桥接模式 完成后等待自动配置 此时出现多了一个ens37 和本地网段一样的 ...
- HBase的单节点集群详细启动步骤(分为Zookeeper自带还是外装)
伪分布模式下,如(weekend110)hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是true,它表示HBase使用自身自带的Zookeeper实例.但是,该实例只能为 ...
- java实习生的成长之路<转>
首先初识语法的阶段,必须要学会怎么操作对象,操作if和for,操作list set map,然后是线程.IO和jdbc什么的,其余的,若是一时不理解,可以后边需要时再学. 这阶段完了,你可以写些能在控 ...
- P3908 异或之和
题目描述 求1 \bigoplus 2 \bigoplus\cdots\bigoplus N1⨁2⨁⋯⨁N 的值. A \bigoplus BA⨁B 即AA , BB 按位异或. 输入输出格式 输入格 ...