文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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.
相关阅读 更多 +
排行榜 更多 +
太平洋飞虎队

太平洋飞虎队

飞行射击 下载
像素世界杯中文版下载

像素世界杯中文版下载

赛车竞速 下载
哆啦A梦的铜锣烧店物语破解版下载

哆啦A梦的铜锣烧店物语破解版下载

模拟经营 下载