View Issue Details

IDProjectCategoryView StatusLast Update
0027067Open CASCADEOCCT:Codingpublic2016-04-20 15:50
ReporterabvAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0027067: Avoid use of virtual methods for implementation of destructors in legacy classes
DescriptionIn classes previously defined using CDL, special trick was used to define destructors (not directly supported by CDL): normal method (usiually with name Delete or Destroy) was defined to perform necessary actions, and destructor was defined using CDL C++ alias directive as calling that method. This is not necessary any more, destructors can be defined explicitly.

Furthermore, in some cases these 'destructing' methods were defined as virtual, and calling them from destructor causes static code analyzers to issue a warning (see 0025725 for more cases).
Steps To ReproduceSome improvements have been made previously in context of 0025622; remaining changes are pushed in branch CR27067. Note that this also fixes one warning from 0025076. Please review.
TagsNo tags attached.
Test case number

Relationships

related to 0025076 closedabv Community Hidden overloaded virtual functions 
related to 0025622 closedbugmaster Open CASCADE CAST analysis: Avoid invocation of virtual Methods of the declared Class in a Constructor or Destructor 
has duplicate 0024768 closedbugmaster Open CASCADE Eliminate redundant ::Destroy() function 
child of 0025725 newabv Open CASCADE Avoid invocation of virtual methods in constructors and destructors 

Activities

git

2016-01-08 20:06

administrator   ~0049730

Branch CR27067 has been created by abv.

SHA-1: 4a4a7e4fc99af2f334db96debc7d39b565488fcf


Detailed log of new commits:

Author: abv
Date: Sun Jan 3 07:11:46 2016 +0300

    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.

kgv

2016-01-08 20:33

developer   ~0049737

Please test the patch.

git

2016-04-17 13:46

administrator   ~0052972

Branch CR27067 has been deleted by kgv.

SHA-1: 4a4a7e4fc99af2f334db96debc7d39b565488fcf

Related Changesets

occt: master e6f550da

2016-01-03 04:11:46

abv


Committer: abv Details Diff
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.
Affected Issues
0027067
mod - src/AdvApp2Var/AdvApp2Var_Criterion.cxx Diff File
mod - src/AdvApp2Var/AdvApp2Var_Criterion.hxx Diff File
mod - src/AdvApprox/AdvApprox_Cutting.cxx Diff File
mod - src/AdvApprox/AdvApprox_Cutting.hxx Diff File
mod - src/Aspect/Aspect_Window.hxx Diff File
mod - src/BinTools/BinTools_ShapeSet.cxx Diff File
mod - src/BinTools/BinTools_ShapeSet.hxx Diff File
mod - src/BRepAlgo/BRepAlgo_BooleanOperation.cxx Diff File
mod - src/BRepAlgo/BRepAlgo_BooleanOperation.hxx Diff File
mod - src/BRepBuilderAPI/BRepBuilderAPI_Command.cxx Diff File
mod - src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx Diff File
mod - src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx Diff File
mod - src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx Diff File
mod - src/BRepClass3d/BRepClass3d_SolidExplorer.cxx Diff File
mod - src/BRepClass3d/BRepClass3d_SolidExplorer.hxx Diff File
mod - src/BRepLib/BRepLib_Command.cxx Diff File
mod - src/BRepLib/BRepLib_Command.hxx Diff File
mod - src/BRepToIGES/BRepToIGES_BREntity.cxx Diff File
mod - src/BRepToIGES/BRepToIGES_BREntity.hxx Diff File
mod - src/CDM/CDM_Document.cxx Diff File
mod - src/CDM/CDM_Document.hxx Diff File
mod - src/ChFi3d/ChFi3d_Builder.cxx Diff File
mod - src/ChFi3d/ChFi3d_Builder.hxx Diff File
mod - src/Cocoa/Cocoa_Window.hxx Diff File
mod - src/Cocoa/Cocoa_Window.mm Diff File
mod - src/FairCurve/FairCurve_Batten.cxx Diff File
mod - src/FairCurve/FairCurve_Batten.hxx Diff File
mod - src/Graphic3d/Graphic3d_DataStructureManager.cxx Diff File
mod - src/Graphic3d/Graphic3d_DataStructureManager.hxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.hxx Diff File
mod - src/Graphic3d/Graphic3d_StructureManager.cxx Diff File
mod - src/Graphic3d/Graphic3d_StructureManager.hxx Diff File
mod - src/IFGraph/IFGraph_SubPartsIterator.cxx Diff File
mod - src/IFGraph/IFGraph_SubPartsIterator.hxx Diff File
mod - src/Interface/Interface_EntityIterator.cxx Diff File
mod - src/Interface/Interface_EntityIterator.hxx Diff File
mod - src/Interface/Interface_FileReaderTool.cxx Diff File
mod - src/Interface/Interface_FileReaderTool.hxx Diff File
mod - src/math/math_BissecNewton.hxx Diff File
mod - src/math/math_BissecNewton.lxx Diff File
mod - src/math/math_BrentMinimum.hxx Diff File
mod - src/math/math_BrentMinimum.lxx Diff File
mod - src/math/math_FRPR.hxx Diff File
mod - src/math/math_FRPR.lxx Diff File
mod - src/math/math_FunctionSetRoot.cxx Diff File
mod - src/math/math_FunctionSetRoot.hxx Diff File
mod - src/math/math_FunctionSetRoot.lxx Diff File
mod - src/math/math_NewtonFunctionSetRoot.hxx Diff File
mod - src/math/math_NewtonFunctionSetRoot.lxx Diff File
mod - src/math/math_NewtonMinimum.hxx Diff File
mod - src/math/math_NewtonMinimum.lxx Diff File
mod - src/math/math_Powell.hxx Diff File
mod - src/math/math_Powell.lxx Diff File
mod - src/MeshVS/MeshVS_Mesh.cxx Diff File
mod - src/MeshVS/MeshVS_Mesh.hxx Diff File
mod - src/MoniTool/MoniTool_OptValue.cxx Diff File
mod - src/MoniTool/MoniTool_OptValue.hxx Diff File
mod - src/MoniTool/MoniTool_TimerSentry.hxx Diff File
mod - src/MoniTool/MoniTool_TimerSentry.lxx Diff File
mod - src/ProjLib/ProjLib_ProjectOnSurface.cxx Diff File
mod - src/ProjLib/ProjLib_ProjectOnSurface.hxx Diff File
mod - src/PrsMgr/PrsMgr_Presentation.cxx Diff File
mod - src/PrsMgr/PrsMgr_Presentation.hxx Diff File
mod - src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx Diff File
mod - src/QANewModTopOpe/QANewModTopOpe_Limitation.hxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.cxx Diff File
mod - src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx Diff File
mod - src/StepData/StepData_FieldList.cxx Diff File
mod - src/StepData/StepData_FieldList.hxx Diff File
mod - src/StepData/StepData_FieldList1.cxx Diff File
mod - src/StepData/StepData_FieldList1.hxx Diff File
mod - src/StepData/StepData_FieldListD.cxx Diff File
mod - src/StepData/StepData_FieldListD.hxx Diff File
mod - src/StepData/StepData_FieldListN.cxx Diff File
mod - src/StepData/StepData_FieldListN.hxx Diff File
mod - src/StepData/StepData_SelectType.cxx Diff File
mod - src/StepData/StepData_SelectType.hxx Diff File
mod - src/Storage/Storage_BaseDriver.cxx Diff File
mod - src/Storage/Storage_BaseDriver.hxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_DSFiller.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_DSFiller.hxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.hxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx Diff File
mod - src/TopTools/TopTools_ShapeSet.cxx Diff File
mod - src/TopTools/TopTools_ShapeSet.hxx Diff File
mod - src/TransferBRep/TransferBRep_Reader.cxx Diff File
mod - src/TransferBRep/TransferBRep_Reader.hxx Diff File
mod - src/Units/Units_ShiftedToken.cxx Diff File
mod - src/Units/Units_ShiftedToken.hxx Diff File
mod - src/Units/Units_Token.cxx Diff File
mod - src/Units/Units_Token.hxx Diff File
mod - src/WNT/WNT_WClass.cxx Diff File
mod - src/WNT/WNT_WClass.hxx Diff File
mod - src/WNT/WNT_Window.cxx Diff File
mod - src/WNT/WNT_Window.hxx Diff File
mod - src/XCAFDoc/XCAFDoc_DocumentTool.cxx Diff File
mod - src/XCAFDoc/XCAFDoc_DocumentTool.hxx Diff File
mod - src/Xw/Xw_Window.cxx Diff File
mod - src/Xw/Xw_Window.hxx Diff File

Issue History

Date Modified Username Field Change
2016-01-08 19:55 abv New Issue
2016-01-08 19:55 abv Assigned To => kgv
2016-01-08 19:55 abv Relationship added child of 0025725
2016-01-08 19:55 abv Relationship added related to 0025076
2016-01-08 20:02 abv Relationship added related to 0025622
2016-01-08 20:06 git Note Added: 0049730
2016-01-08 20:08 abv Status new => resolved
2016-01-08 20:08 abv Steps to Reproduce Updated
2016-01-08 20:30 kgv Relationship added has duplicate 0024768
2016-01-08 20:33 kgv Note Added: 0049737
2016-01-08 20:33 kgv Assigned To kgv => bugmaster
2016-01-08 20:33 kgv Status resolved => reviewed
2016-01-11 12:03 apv Assigned To bugmaster => apv
2016-01-11 12:19 apv Assigned To apv => bugmaster
2016-01-15 16:57 abv Changeset attached => occt master e6f550da
2016-01-15 16:57 abv Assigned To bugmaster => abv
2016-01-15 16:57 abv Status reviewed => verified
2016-01-15 16:57 abv Resolution open => fixed
2016-04-17 13:46 git Note Added: 0052972
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed