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.
Определено в файле <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) |
умолчанию Deleter для 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.
Определено в файле <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) |
тег типа используются для выбора распределитель-Aware перегрузок конструктора 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 используется для выбора распределитель-Aware конструкторов 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. (шаблон класса) |
Определено в файле <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.
Определено в файле <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. (шаблон функции) |
[править] Поддержка Сборщик мусора
Определено в файле <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. (функция) |
[править] Разное
Определено в файле <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.