Effective C++笔记 Use the same from in corresponding uses of new and delete 配对使用new/delete, new[]/delete[] //vs2017 void test1() { //对单个目标调用delete[],访问异常 string *str = new string; delete[] str; } void test02() { //对数组使用delete,触发异常 string *str = new string[10]; delete str; } typedef数组类型[] 总结