文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Item 8:Understand the different meanings of new and delete.(More Effective C++)

Item 8:Understand the different meanings of new and delete.(More Effective C++)

时间:2011-06-13  来源:Ray Z

Though you want to create an object on the heap, use the new operator. It both allocates memory and calls a constructor for the object. If you only want to allocate memory, call operator new; no constructor will be called. If you want to customize the memory allocation that takes place when heap objects are created, write your own version of operator new and use the new operator; it will automatically invoke your custom version of operator new. If you want to construct an object in memory you've already got a pointer to, use placement new.
相关阅读 更多 +
排行榜 更多 +
侏罗纪狩猎

侏罗纪狩猎

飞行射击 下载
射击瓶子

射击瓶子

飞行射击 下载
水上乐园滑行大作战最新版

水上乐园滑行大作战最新版

休闲益智 下载