9
References
CWE Version 4.14
CWE-1045: Parent Class with a Virtual Destructor and a Child Class without a Virtual Destructor
CWE-1045: Parent Class with a Virtual Destructor
and a Child Class without a Virtual Destructor 1880
[REF-960]Object Management Group (OMG). "Automated Source Code Maintainability Measure
(ASCMM)". 2016 January. < https://www.omg.org/spec/ASCMM/ >.2023-04-07.
CWE-1045: Parent Class with a Virtual Destructor and a Child Class without a
Virtual Destructor
Weakness ID : 1045
Structure : Simple
Abstraction : Base
Description
A parent class has a virtual destructor method, but the parent has a child class that does not have
a virtual destructor.
Extended Description
This issue can prevent the product from running reliably, since the child might not perform essential
destruction operations. If the relevant code is reachable by an attacker, then this reliability problem
might introduce a vulnerability, such as a memory leak (CWE-401).
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 1076 Insufficient Adherence to Expected Conventions 1916
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 1006 Bad Coding Practices 2422
Weakness Ordinalities
Indirect :
Common Consequences
Scope Impact Likelihood
Other Reduce Reliability
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1129 CISQ Quality Measures (2016) - Reliability 1128 2440
MemberOf 1306 CISQ Quality Measures - Reliability 1305 2483
MemberOf 1307 CISQ Quality Measures - Maintainability 1305 2484
MemberOf 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
Taxonomy Mappings
CWE Version 4.14
CWE-1046: Creation of Immutable Text Using String Concatenation
CWE-1046: Creation of Immutable Text Using String Concatenation