{"provider_name":"Hatena Blog","blog_title":"Faith and Brave - C++\u3067\u904a\u307c\u3046","image_url":null,"height":"190","type":"rich","author_name":"faith_and_brave","url":"https://faithandbrave.hateblo.jp/entry/20121107/1352274285","categories":["C++"],"version":"1.0","title":" nothrow\u306adelete","description":"C++\u306enew\u6f14\u7b97\u5b50\u306f\u3001\u5931\u6557\u6642\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067std::balloc\u4f8b\u5916\u3092\u6295\u3052\u307e\u3059\u304c\u3001std::nothrow\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5931\u6557\u6642\u306b\u30cc\u30eb\u304c\u8fd4\u3063\u3066\u304f\u308b\u3088\u3046\u306b\u3067\u304d\u307e\u3059\uff1a #include <new> int main() { int* p = new(std::nothrow) int[3]; // \u5931\u6557\u6642\u306b\u30cc\u30eb\u304c\u8fd4\u308b if (p == nullptr) { ... } delete[] p; } \u3053\u306enothrow\u7248\u306enew\u6f14\u7b97\u5b50\u3082\u3001\u307b\u304b\u306e\u6f14\u7b97\u5b50\u3068\u540c\u69d8\u306b\u7f6e\u304d\u63db\u3048\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u7f6e\u304d\u63db\u3048\u53ef\u80fd\u306a\u6f14\u7b97\u5b50\u306b\u306f\u3001\u306a\u305c\u304bnothrow\u7248\u306edelete\u3082\u3042\u308a\u307e\u3059\uff1a void operator\u2026","provider_url":"https://hatena.blog","blog_url":"https://faithandbrave.hateblo.jp/","published":"2012-11-07 16:44:45","author_url":"https://blog.hatena.ne.jp/faith_and_brave/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F20121107%2F1352274285\" title=\" nothrow\u306adelete - Faith and Brave - C++\u3067\u904a\u307c\u3046\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}