new delete
时间: 2023-08-28 09:05:44 浏览: 94
new和delete是C++中的内存管理操作符。它们用于动态分配和释放内存空间。new关键字有多种用法,包括运算符用法、函数用法和定位new。运算符用法用于创建单个对象,函数用法用于创建对象数组,而定位new可用于在已分配的内存位置上构造对象。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *3* [C++new与delete的使用](https://blog.csdn.net/weixin_56935264/article/details/124858025)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *2* [深入理解new[]和delete[]](https://blog.csdn.net/zhaxun/article/details/120139067)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文