Archived issue #0025618
Avoid classes with an assignment operator and not implementing both a destructor and a copy constructor
Description
If you need an operator= , you also need a destructor and a copy constructor.
If you need an assignment operator, it's because you need something like a deep copy, or some other management of resources. Thus it is almost certain that you will need a destructor and override the copy constructor.
If you need an assignment operator, it's because you need something like a deep copy, or some other management of resources. Thus it is almost certain that you will need a destructor and override the copy constructor.
Steps to reproduce
not applicable
Additional information
According to the CAST report in most cases the problem is associated to DEFINE_STANDARD_HANDLECLASS. It is necessary to add empty virtual destructor in DEFINE_STANDARD_HANDLECLASS macros to avoid this problem.
The following classes have problem:
- IntPolyh_StartPoint
- Quantity_Color
The following classes have problem:
- IntPolyh_StartPoint
- Quantity_Color
Public activity
1 archived note
Participants are labeled by their role within this record.
Branch CR25571 is a ready to be reviewed.
Related records