Low level memory management
来自cppreference.com
|
|
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. |
新的表达是唯一的方法来创建一个对象或一个对象数组与动态存储时间,也就是在创建它的范围不仅限于一生。一种新的表达获得通过调用存储分配功能。一个delete表达式摧毁一个派生类对象或数组创建一个新的表达和释放函数调用。默认的分配和释放功能,以及相关的功能,类型和对象,声明在头
<new>. Original:
The 新的表达 is the only way to create an object or an array of objects with dynamic storage duration, that is, with lifetime not restricted to the scope in which it is created. A new-expression obtains storage by calling an allocation function. A delete表达式 destroys a most derived object or an array created by a new-expression and calls the deallocation function. The default allocation and deallocation functions, along with related functions, types, and objects, are declared in the header
<new>. 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
<new> | |
Original: Functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 分配的功能 Original: allocation functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 释放函数 Original: deallocation functions 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 the current new handler The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| 注册一个新的处理程序 Original: registers a new handler The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
Original: Classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 内存分配失败时抛出的异常 Original: exception thrown when memory allocation fails 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: exception thrown on allocation of array with invalid length The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| 标签类型来选择一个非投掷“分配的功能” Original: tag type used to select an non-throwing allocation function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) | |
Original: Types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 新的处理程序的函数指针类型 Original: function pointer type of the new handler The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |
Original: Objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 一个对象的类型 nothrow_t用来选择一个非投掷“分配的功能” Original: an object of type nothrow_t used to select an non-throwing allocation function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (不变) | |