mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-29 22:41:48 +08:00
0025571: Avoid base Classes without virtual Destructors
Destructors of collection classes from NCollection and math_Function are made virtual to allow safe destruction by pointer to base class. Destructors of classes HatchGen_IntersectionPoint, IntCurveSurface_Intersection, Intf_Interference, IntRes2d_Intersection are made protected to avoid possibility of destructing by pointer to corresponding base class.
This commit is contained in:
@@ -184,6 +184,9 @@ protected: //! @name protected methods
|
||||
myData = allocMemBlocks (myCapacity);
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
virtual ~NCollection_BaseVector() {}
|
||||
|
||||
//! @return pointer to memory where to put the new item
|
||||
Standard_EXPORT void* expandV (const Standard_Integer theIndex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user