The analyzer detected an error that has to do with calling a destructor for the second time. When an object is created on the stack, the destructor will be called when the object leaves the scope. The analyzer detected a direct call to the destructor for this object.
Consider the following example:
void func(){
X a;
a.~X();
foo();
}
In this code, the destructor for the 'a' object is called directly. But when the 'func' function finished, the destructor for 'a' will be called once again.
To fix this error, we need to remove incorrect code or adjust the code according to the memory management model used.
Correct code:
void func(){
X a;
foo();
}
This diagnostic is classified as:
|
You can look at examples of errors detected by the V749 diagnostic. |
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!