The Wayback Machine - https://web.archive.org/web/20180204003006/http://ja.cppreference.com:80/w/cpp/language/delete
名前空間
変種
操作

delete expression

提供: cppreference.com
< cpp‎ | language

 
 
C++言語
一般的なトピック
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
フロー制御
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件付き実行文
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
繰り返し文
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
文をジャンプします
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
関数の宣言
ラムダ関数の宣言
関数テンプレート
の歴史。インライン指定
例外仕様(廃止予定)
noexcept指定子(C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
名前空間
Original:
Namespaces
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.
decltype specifier(C++11)
指定子
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
CV指定
貯蔵期間指定
constexprの指定子(C++11)
自動指定(C++11)
alignas指定子(C++11)
初期化
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
リテラル
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
代替表現
ユーティリティ
Original:
Utilities
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.
typedef declaration
型の別名宣言(C++11)
属性(C++11)
キャストします
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
暗黙の型変換
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Cスタイルキャストと機能
メモリの割り当て
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete expression
クラス
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:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
特殊なメンバ関数
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
テンプレート
Original:
Templates
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:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
インラインアセンブリ
 
とリリースしたメモリ領域で割り当てられたオブジェクト(s)は破棄します
Original:
Destructs object(s) previously allocated by the
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]構文

::(オプション)    delete   expression (1)
::(オプション)    delete []expression (2)

[編集]説明

以前new式で構成されたオブジェクトを破棄し、得られたメモリ領域を解放します。 expressionnew式への前回の呼び出しによって返されたポインタ値になる必要があります。配列の2番目のバージョンを使用しなければならないのに対し、シングルに割り当てられたオブジェクトの場合、式の最初のバージョンは、使用しなければなりません。 配置によって初期化されたオブジェクトを解放する削除式が存在しない新しい、メモリ解放関数とデストラクタを明示的に呼び出さなければなりません.
Original:
Destructs objects, previously constructed by new expression and releases the obtained memory area. The expression must result in a pointer value that was returned by previous call to the new expression. For single allocated objects the first version of the expression must be used, whereas for arrays the second version must be used. There is no delete expression deallocating objects initialized by placement new, deallocation function and destructor must be explicitly called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
メモリはメモリ解放関数、どちらoperator delete(表現の最初のバージョンの場合)またはoperator delete[](式の2番目のバージョンの場合)で解放され.
Original:
The memory is deallocated by an メモリ解放関数, either operator delete (for the first version of the expression) or operator delete[] (for the second version of the expression).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
メモリ解放関数の名前はまずローカルクラスタイプスコープで検索され、検索が失敗した場合にのみ、グローバルな名前空間が検索されます。 ::delete式中に存在する場合、唯一のグローバルな名前空間が検索されます。関数のプロトタイプは次のようになっている必要があります
Original:
The deallocation function's name is firstly looked up in the local class type scope and only if the lookup fails, the global namespace is looked up. If :: is present in the delete expression, only the global namespace is looked up. The prototype of the function must look like the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
voidoperator delete  (void*ptr);
for the first version
voidoperator delete[](void*ptr);
for the second version
両方のこれらの関数は、暗黙的に各翻訳単位で宣言されています。プログラムは、それらを明示的に実装されていない限り、また、暗黙の実装は、デフォルトでは、コンパイラによって提供されています。詳細については、このを参照してください。.
Original:
Both these functions are implicitly declared in each translation unit. Also, implicit implementations are provided by the compiler by default, unless the program has explicitly implemented them. See この for more information.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]キーワード

delete

close