CPP: Fix issue when destructor body is missing.

This commit is contained in:
Geoffrey White
2018-10-10 16:05:26 +01:00
parent 5931a978dc
commit b861df0887
3 changed files with 9 additions and 2 deletions

View File

@@ -11,7 +11,6 @@
| ExternalOwners.cpp:49:3:49:20 | ... = ... | Resource a is acquired by class MyScreen but not released anywhere in this class. |
| ListDelete.cpp:21:3:21:21 | ... = ... | Resource first is acquired by class MyThingColection but not released anywhere in this class. |
| NoDestructor.cpp:23:3:23:20 | ... = ... | Resource n is acquired by class MyClass5 but not released anywhere in this class. |
| NoDestructor.cpp:75:3:75:21 | ... = ... | Resource ptr is acquired by class TemplateWithDestructor<int *> but not released anywhere in this class. |
| PlacementNew.cpp:36:3:36:36 | ... = ... | Resource p1 is acquired by class MyTestForPlacementNew but not released anywhere in this class. |
| SelfRegistering.cpp:25:3:25:24 | ... = ... | Resource side is acquired by class MyOwner but not released anywhere in this class. |
| Variants.cpp:25:3:25:13 | ... = ... | Resource f is acquired by class MyClass4 but not released anywhere in this class. |

View File

@@ -72,7 +72,7 @@ class TemplateWithDestructor
{
public:
TemplateWithDestructor(int len) {
ptr = new char[len]; // GOOD [FALSE POSITIVE]
ptr = new char[len]; // GOOD
}
~TemplateWithDestructor()