mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 13:14:40 +03:00
Merge pull request #581 from kpp/kpp-new-delete-mistatch
new[] delete[] mismatch
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