文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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.
相关阅读 更多 +
排行榜 更多 +
Polkadot币最具跨链互通的交易所币安下载

Polkadot币最具跨链互通的交易所币安下载

金融理财 下载
VeChain币最具供应链优化的交易所币安下载

VeChain币最具供应链优化的交易所币安下载

金融理财 下载
Cardano币最具未来价值的交易所币安下载

Cardano币最具未来价值的交易所币安下载

金融理财 下载