Merge pull request #581 from kpp/kpp-new-delete-mistatch

new[] delete[] mismatch
This commit is contained in:
Gabriel Dos Reis
2016-04-11 05:22:25 -07:00

View File

@@ -10510,7 +10510,7 @@ We could carefully release the resource before the throw:
int* p = new int[12]; int* p = new int[12];
// ... // ...
if (i < 17) { if (i < 17) {
delete p; delete[] p;
throw Bad {"in f()", i}; throw Bad {"in f()", i};
} }
// ... // ...