mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Update CppCoreGuidelines.md
Must be `int* p = new int[12]; delete[] p;`
This commit is contained in:
@@ -10510,7 +10510,7 @@ We could carefully release the resource before the throw:
|
||||
int* p = new int[12];
|
||||
// ...
|
||||
if (i < 17) {
|
||||
delete p;
|
||||
delete[] p;
|
||||
throw Bad {"in f()", i};
|
||||
}
|
||||
// ...
|
||||
|
||||
Reference in New Issue
Block a user