mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -78,13 +78,8 @@ public:
|
||||
Standard_EXPORT Cocoa_Window (NSView* theViewNS);
|
||||
#endif
|
||||
|
||||
//! Destroies the Window and all resourses attached to it
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
|
||||
~Cocoa_Window()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
//! Destroys the Window and all resourses attached to it
|
||||
Standard_EXPORT ~Cocoa_Window();
|
||||
|
||||
//! Opens the window <me>
|
||||
Standard_EXPORT virtual void Map() const Standard_OVERRIDE;
|
||||
|
@@ -143,10 +143,10 @@ Cocoa_Window::Cocoa_Window (NSView* theViewNS)
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Destroy
|
||||
// function : ~Cocoa_Window
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Cocoa_Window::Destroy()
|
||||
Cocoa_Window::~Cocoa_Window()
|
||||
{
|
||||
#if !defined(HAVE_OBJC_ARC)
|
||||
Cocoa_LocalPool aLocalPool;
|
||||
|
Reference in New Issue
Block a user