{"version":"1.0","blog_title":"\u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18","image_url":null,"provider_url":"https://hatena.blog","blog_url":"https://toburau.hatenablog.jp/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20111128%2F1322503487\" title=\"placement new(\u914d\u7f6enew) - \u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"toburau","type":"rich","height":"190","url":"https://toburau.hatenablog.jp/entry/20111128/1322503487","categories":["C++"],"title":"placement new(\u914d\u7f6enew)","author_url":"https://blog.hatena.ne.jp/toburau/","published":"2011-11-28 03:04:47","provider_name":"Hatena Blog","description":"\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30de\u306b\u306a\u308b\u524d\u306b\u899a\u3048\u3066\u304a\u304d\u305f\u3044\u6280\u8853\u3067\u521d\u3081\u3066\u77e5\u3063\u305f\u30e1\u30e2\u30ea\u78ba\u4fdd\u306e\u65b9\u6cd5\u3002 \u307e\u305a\u3001operator new()\u3068\u3044\u3046\u95a2\u6570\u3067\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u306e\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3067\u304d\u308b\u3002 char* memory = operator new( sizeof(char) * 10 ); placement new\u306f\u305d\u306e\u6307\u5b9a\u3057\u305f\u30e1\u30e2\u30ea\u30a2\u30c9\u30ec\u30b9\u306b\u9818\u57df\u3092\u78ba\u4fdd\u3067\u304d\u308b\u3002 char* p = new( memory ) char[10]; \u3053\u306e\u3068\u304d\u3001memory\u3068p\u306e\u5024\u306f\u540c\u3058\u306b\u306a\u308b\u3002 \u89e3\u653e\u3059\u308b\u5834\u5408\u306foperator delete()\u3092\u4f7f\u3046\u3002 operator delete( memory ); \u3053\u308c\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f\u3059\u3067\u306b\u5272\u308a\u2026"}