We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the error handling case at the end of the method we have:
buf = CreateErrorMsgFromInfo(hr, &excepInfo, nm);
and
dispIdAsName = new char[256];
and later:
if (buf) delete buf; if (dispIdAsName) delete dispIdAsName;
The latter should be:
delete[] buf; delete[] dispIdAsName;
to agree with how they were created, as new wchar_t[...] and new char[...] respectively. The null tests are unnecessary.
new wchar_t[...]
new char[...]
The text was updated successfully, but these errors were encountered:
Actually dispIdAsName could be declared as char dispIdAsName[256]; to avoid the delete [] altogether.
dispIdAsName
char dispIdAsName[256];
delete []
Sorry, something went wrong.
For clarity, the problems here are:
delete
delete[]
https://github.com/freemansoft/jacob-project/issues/40
8e4472e
No branches or pull requests
In the error handling case at the end of the method we have:
and
and later:
The latter should be:
to agree with how they were created, as
new wchar_t[...]
andnew char[...]
respectively.The null tests are unnecessary.
The text was updated successfully, but these errors were encountered: