Dynamic memory management
来自cppreference.com
< cpp
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
[编辑] 智能指针
启用了自动,智能指针异常安全的,对象的生命周期管理.
Original:
Smart pointers enable automatic, exception-safe, object lifetime management.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<memory> | |
Original: Pointer categories The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
拥有唯一的对象语义的智能指针 Original: smart pointer with unique object ownership semantics The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
smart pointer with shared object ownership semantics (类模板) |
| (C++11) |
std::shared_ptr管理对象的弱引用 Original: weak reference to an object managed by std::shared_ptr The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (过时了) |
严格的对象的所有权语义的智能指针 Original: smart pointer with strict object ownership semantics The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
Original: Helper classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
混合型业主的共享和弱指针的顺序 Original: provides mixed-type owner-based ordering of shared and weak pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
允许一个对象来创建一个 shared_ptr指本身 Original: allows an object to create a shared_ptr referring to itself The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
访问 weak_ptr它指的是已经销毁的对象时抛出的异常 Original: exception thrown when accessing a weak_ptr which refers to already destroyed object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| (C++11) |
unique_ptr默认的删除 Original: default deleter for unique_ptr The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
[编辑] 分配器
分配器是类模板封装的内存分配策略。这使得通用的容器,去耦内存管理从数据本身.
Original:
Allocators are class templates encapsulating memory allocation strategy. This allows generic containers to decouple memory management from the data itself.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<memory> | |
| the default allocator (类模板) | |
| (C++11) |
提供分配器类型的信息 Original: provides information about allocator types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
使用的标签类型选择分配器感知的构造函数重载 Original: tag type used to select allocator-aware constructor overloads The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| (C++11) |
一个对象的类型std::allocator_arg_t用来选择分配器感知的构造函数 Original: an object of type std::allocator_arg_t used to select allocator-aware constructors The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (不变) |
| (C++11) |
检查如果指定的类型支持使用分配器建设的 Original: checks if the specified type supports uses-allocator construction The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| Defined in header
<scoped_allocator> | |
| (C++11) |
实现多级的多级容器分配器 Original: implements multi-level allocator for multi-level containers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
[编辑] 未初始化的存储空间
一些实用程序提供创建和访问原始数据存储
Original:
Several utilities are provided to create and access raw storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<memory> | |
| 一个未初始化的内存区域复制的对象范围 Original: copies a range of objects to an uninitialized area of memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| (C++11) |
复制的对象的数量的未初始化区域的内存 Original: copies a number of objects to an uninitialized area of memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| 一个对象复制到一个未初始化的内存区域 Original: copies an object to an uninitialized area of memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 一个对象复制到一个未初始化的内存区域 Original: copies an object to an uninitialized area of memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 一个迭代器,允许标准算法,将结果存储在未初始化的内存 Original: an iterator that allows standard algorithms to store results in uninitialized memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) | |
| 获得未初始化的存储 Original: obtains uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 释放未初始化的存储 Original: frees uninitialized storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
[编辑] 垃圾收集器的支持
| Defined in header
<memory> | |
| (C++11) |
宣布,一个对象不能被回收 Original: declares that an object can not be recycled The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) |
宣布,一个对象可以回收利用 Original: declares that an object can be recycled The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
声明的内存区域不包含可追踪的指针 Original: declares that a memory area does not contain traceable pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) |
取消的std::declare_no_pointers效果 Original: cancels the effect of std::declare_no_pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) |
列出指针安全模式 Original: lists pointer safety models The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| (C++11) |
返回当前指针安全模型 Original: returns the current pointer safety model The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
[编辑] 杂项
| Defined in header
<memory> | |
| (C++11) |
提供有关类似指针的类型的信息 Original: provides information about pointer-like types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
获得的对象的实际地址,即使在“&”运算符被重载 Original: obtains actual address of an object, even if the & operator is overloaded The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
对齐的指针在缓冲器中 Original: aligns a pointer in a buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
[编辑] C-风格的内存管理
包括如std::malloc,std::free
Original:
Includes e.g. std::malloc, std::free
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 低级别的内存管理
包括如
operator new , operator delete ,std::set_new_handlerOriginal:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.