Apply suggestions from code review

Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
ihsinme
2022-03-15 08:53:00 +03:00
committed by GitHub
parent a9a2ca3850
commit e99eaeb256
3 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
...
try {
if (chackValue) throw exception();
if (checkValue) throw exception();
valData->bufMyData = new myData*[valData->sizeInt];
}
@@ -13,7 +13,7 @@ try {
}
...
try {
if (chackValue) throw exception();
if (checkValue) throw exception();
valData->bufMyData = new myData*[valData->sizeInt];
}

View File

@@ -3,7 +3,7 @@
"qhelp.dtd">
<qhelp>
<overview>
<p>When clearing the data in the catch block, you must be sure that the memory was allocated before the exception.</p>
<p>When releasing memory in a catch block, be sure that the memory was allocated and has not already been released.</p>
</overview>

View File

@@ -151,7 +151,7 @@ void funcWork3() {
void funcWork4() {
int a;
myGlobalData *valData;
myGlobalData *valData = 0;
try {
valData = new myGlobalData;
cleanFunction();
@@ -167,7 +167,7 @@ void funcWork4() {
void funcWork4b() {
int a;
myGlobalData *valData;
myGlobalData *valData = 0;
try {
valData = new myGlobalData;
cleanFunction();
@@ -181,7 +181,7 @@ void funcWork4b() {
}
void funcWork5() {
int a;
myGlobalData *valData;
myGlobalData *valData = 0;
try {
valData = new myGlobalData;
cleanFunction();
@@ -202,7 +202,7 @@ void funcWork5() {
void funcWork5b() {
int a;
myGlobalData *valData;
myGlobalData *valData = 0;
try {
valData = new myGlobalData;
cleanFunction();
@@ -220,7 +220,7 @@ void funcWork5b() {
void funcWork6() {
int a;
int flagB = 0;
myGlobalData *valData;
myGlobalData *valData = 0;
try {
valData = new myGlobalData;
cleanFunction();