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:
@@ -70,11 +70,12 @@ CDM_Document::CDM_Document():
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Destroy
|
||||
//function : ~CDM_Document
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void CDM_Document::Destroy() {
|
||||
CDM_Document::~CDM_Document()
|
||||
{
|
||||
if(!myMetaData.IsNull()) myMetaData->UnsetDocument();
|
||||
}
|
||||
|
||||
|
@@ -384,11 +384,7 @@ protected:
|
||||
|
||||
Standard_EXPORT CDM_Document();
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
~CDM_Document()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
Standard_EXPORT ~CDM_Document();
|
||||
|
||||
Standard_Boolean myResourcesAreLoaded;
|
||||
|
||||
|
Reference in New Issue
Block a user