mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027067: Avoid use of virtual methods for implementation of destructors in legacy classes
Redundant methods Delete() and Desroy(), created in CDL as a hack to define destructor for the class, are removed; their definitions are converted to definition of destructors. In a couple of places methods Destroy() are preserved (bug made non-virtual) because they are called explicitly.
This commit is contained in:
@@ -229,10 +229,10 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Destroy
|
||||
// function : ~Xw_Window
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Xw_Window::Destroy()
|
||||
Xw_Window::~Xw_Window()
|
||||
{
|
||||
if (myIsOwnWin && myXWindow != 0 && !myDisplay.IsNull())
|
||||
{
|
||||
|
@@ -58,13 +58,8 @@ public:
|
||||
const Window theXWin,
|
||||
const Aspect_FBConfig theFBConfig = NULL);
|
||||
|
||||
//! Destroies the Window and all resourses attached to it
|
||||
Standard_EXPORT virtual void Destroy() Standard_OVERRIDE;
|
||||
|
||||
~Xw_Window()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
//! Destroys the Window and all resourses attached to it
|
||||
Standard_EXPORT ~Xw_Window();
|
||||
|
||||
//! Opens the window <me>
|
||||
Standard_EXPORT virtual void Map() const Standard_OVERRIDE;
|
||||
|
Reference in New Issue
Block a user