mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03: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:
@@ -80,17 +80,16 @@ public:
|
||||
|
||||
//! Dump of the point on element.
|
||||
Standard_EXPORT virtual void Dump (const Standard_Integer Index = 0) const = 0;
|
||||
Standard_EXPORT virtual ~HatchGen_IntersectionPoint();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Creates an empty intersection point.
|
||||
Standard_EXPORT HatchGen_IntersectionPoint();
|
||||
|
||||
//! Destructor is protected for safer inheritance
|
||||
~HatchGen_IntersectionPoint() {}
|
||||
|
||||
protected:
|
||||
|
||||
Standard_Integer myIndex;
|
||||
Standard_Real myParam;
|
||||
@@ -99,20 +98,6 @@ protected:
|
||||
TopAbs_State myAfter;
|
||||
Standard_Boolean mySegBeg;
|
||||
Standard_Boolean mySegEnd;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _HatchGen_IntersectionPoint_HeaderFile
|
||||
|
Reference in New Issue
Block a user