View Issue Details

IDProjectCategoryView StatusLast Update
0025619Open CASCADEOCCT:Codingpublic2015-05-14 16:27
ReporteraznAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementing both an assignment operator and a copy constructor
DescriptionIf you need a destructor you probably also need an operator= and a copy constructor.

If you need a destructor, it is probably because your are doing some management of resources. Thus it's probable that you will need a copy constructor and override the copy constructor.
Steps To Reproducenot applicable
Additional information
and documentation updates
In most cases these problems are “cdl” rudiments. Some classes have destructor that contains Delete() or Destroy() method. It would be right to move the body of these methods in destructor and then remove them. It is necessary to add empty copy constructor and operator= to private section.

The following classes contain the problem:
- tsee_entity
- Select3D_PointData
- Standard_MMgrFactory
- ProjLib_OnSurface
- BinomAllocator
- OSD_PerfMeter
- StorageInfo
- OpenGl_UnpackAlignmentSentry
- LDOM_StringElem
- IntPatch_InfoPD
- TableauRejection
- HMath_Vector (BRepGProp_Sinert.cxx, BRepGProp_Vinert.cxx)
- Draw_View
- BOPTest_Session
- BOPCol_MemBlock
- BSB_T3Bits
- NCollection_Handle::Ptr
- Buffer (from Standard_Boolean Message_MsgFile::LoadFile (const Standard_CString))

See: 0025577, 0025572.
TagsNo tags attached.
Test case numberNot needed

Activities

git

2014-12-19 12:52

administrator   ~0035512

Branch CR25619 has been created by azn.

SHA-1: 08179bd6a2db6e7191f6e3273e75a10e6b0dc774


Detailed log of new commits:

Author: azn
Date: Fri Dec 19 12:06:11 2014 +0300

    0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementing both an assignment operator and a copy constructor

git

2014-12-24 10:59

administrator   ~0035657

Branch CR25619 has been updated by azn.

SHA-1: 2352a1c69d30852e1a9a8a22ad40440a355ef7d1


Detailed log of new commits:

Author: azn
Date: Wed Dec 24 10:59:21 2014 +0300

    0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementing both an assignment operator and a copy constructor
    
    Fix of StorageInfo struct.

abv

2015-03-27 21:36

manager   ~0038962

Alexander, what is the status of this issue?

git

2015-04-10 10:21

administrator   ~0039551

Branch CR25619 has been updated forcibly by azn.

SHA-1: 78a0122c040e767a7bb5efb264db94f01a7d7914

git

2015-04-15 10:38

administrator   ~0039740

Branch CR25619 has been updated forcibly by azn.

SHA-1: 91e49f2948a26a54400789a6f4ba5a0c11d77e3f

git

2015-04-15 11:59

administrator   ~0039757

Branch CR25619 has been updated forcibly by azn.

SHA-1: 465a55d5162f72bc2c58fb0c289d7f80967f25f5

azn

2015-04-15 12:01

developer   ~0039759

Please review.

abv

2015-04-15 19:16

manager   ~0039812

No remarks, please test.

Just a question: was refactoring of Draw_View really needed?

apv

2015-04-16 14:58

tester   ~0039883

Dear BugMaster,

Compilation of branch CR25619 has been failed on Linux.
More information could be found by the following links:
http://jenkins-test-02.nnov.opencascade.com/user/mnt/my-views/view/CR25619/job/CR25619-master_build_occt_linux/2/parsed_console/

git

2015-04-17 08:55

administrator   ~0039937

Branch CR25619 has been updated forcibly by azn.

SHA-1: 6bfa91ce883dd3258944f9c7c0f7ee5fefdf1f0b

azn

2015-04-17 08:57

developer   ~0039938

Dear Bugmaster,

Compilation errors have been fixed. Please test.

git

2015-04-17 17:26

administrator   ~0039980

Branch CR25619 has been updated forcibly by apv.

SHA-1: 0f1346e3150e6eb703cb4ba31dcb271ae9d177a0

apv

2015-04-17 17:26

tester   ~0039981

Branch CR25619 has been rebased on the current master

git

2015-04-24 17:09

administrator   ~0040223

Branch CR25619 has been updated forcibly by apv.

SHA-1: 0ad933cd9b0cc58f779cf1b0628523373740e2f4

apv

2015-04-24 17:09

tester   ~0040224

Branch CR25619 has been rebased on the current master

apv

2015-04-27 11:07

tester   ~0040265

Last edited: 2015-04-27 11:07

Dear BugMaster,

Compilation of branch CR25619 has been failed on Linux and MacOS. More information could be found by the following links:
Linux:
http://jenkins-test-02.nnov.opencascade.com/view/CR25619-master/job/CR25619-master_build_occt_linux/1/parsed_console/
MacOS:
http://jenkins-test-02.nnov.opencascade.com/view/CR25619-master/job/CR25619-master_prepare_build_occt_MacOS/1/parsed_console/

git

2015-04-27 14:40

administrator   ~0040276

Branch CR25619 has been updated forcibly by azn.

SHA-1: a10d575f061f93a8d9be3e49c0e58e8423a8e23a

azn

2015-04-27 14:41

developer   ~0040277

Compilation errors has been fixed. Please test.

apv

2015-04-28 16:47

tester   ~0040366

Dear BugMaster,

Branch CR25619 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: a10d575f061f93a8d9be3e49c0e58e8423a8e23a

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 4 (4 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 94690876 / 94583495 [+0.11%]
Total CPU difference: 56100.069999999185 / 51017.29999999946 [+9.96%]

Testing on Windows:
Total MEMORY difference: 57261127 / 57271309 [-0.02%]
Total CPU difference: 15921.134457899074 / 15811.26295359897 [+0.69%]

git

2015-05-14 16:27

administrator   ~0040977

Branch CR25619 has been deleted by inv.

SHA-1: a10d575f061f93a8d9be3e49c0e58e8423a8e23a

Related Changesets

occt: master 96f3bacc

2014-12-19 09:06:11

azn


Committer: bugmaster Details Diff
0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementing both an assignment operator and a copy constructor

- Fix compilation errors.
- Branch has been rebased on new master.

0025619: CAST analysis: Avoid classes with a non-empty destructor and not implementing both an assignment operator and a copy constructor

The problem has been removed from following classes:
- tsee_entity
- Select3D_PointData
- Standard_MMgrFactory
- ProjLib_OnSurface
- BinomAllocator
- OSD_PerfMeter
- StorageInfo
- OpenGl_UnpackAlignmentSentry
- IntPatch_InfoPD
- TableauRejection
- Draw_View
- BOPTest_Session
- BOPCol_MemBlock
- BSB_T3Bits
- NCollection_Handle::Ptr
- Buffer (from Standard_Boolean Message_MsgFile::LoadFile (const Standard_CString))
Affected Issues
0025619
mod - src/BOPTest/BOPTest_Objects.cxx Diff File
add - src/Draw/Draw_View.cxx Diff File
add - src/Draw/Draw_View.hxx Diff File
mod - src/Draw/Draw_Viewer.cxx Diff File
mod - src/Draw/FILES Diff File
mod - src/HLRBRep/HLRBRep_Data.cxx Diff File
mod - src/Message/Message_MsgFile.cxx Diff File
mod - src/NCollection/NCollection_Handle.hxx Diff File
mod - src/OSD/OSD_MAllocHook.cxx Diff File
mod - src/OSD/OSD_PerfMeter.hxx Diff File
mod - src/TestTopOpe/TestTopOpe_HDSCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2014-12-16 17:49 azn New Issue
2014-12-16 17:49 azn Assigned To => azn
2014-12-19 12:52 git Note Added: 0035512
2014-12-24 10:59 git Note Added: 0035657
2015-03-27 21:36 abv Note Added: 0038962
2015-03-27 21:36 abv Status new => assigned
2015-04-10 10:21 git Note Added: 0039551
2015-04-15 10:38 git Note Added: 0039740
2015-04-15 11:59 git Note Added: 0039757
2015-04-15 12:01 azn Note Added: 0039759
2015-04-15 12:01 azn Assigned To azn => abv
2015-04-15 12:01 azn Status assigned => resolved
2015-04-15 12:01 azn Steps to Reproduce Updated
2015-04-15 19:16 abv Note Added: 0039812
2015-04-15 19:16 abv Assigned To abv => bugmaster
2015-04-15 19:16 abv Status resolved => reviewed
2015-04-15 19:27 apv Assigned To bugmaster => apv
2015-04-16 14:58 apv Note Added: 0039883
2015-04-16 14:58 apv Assigned To apv => azn
2015-04-16 14:58 apv Status reviewed => assigned
2015-04-17 08:55 git Note Added: 0039937
2015-04-17 08:57 azn Note Added: 0039938
2015-04-17 08:57 azn Assigned To azn => apv
2015-04-17 08:57 azn Status assigned => resolved
2015-04-17 10:24 abv Assigned To apv => bugmaster
2015-04-17 10:24 abv Status resolved => reviewed
2015-04-17 15:43 apv Assigned To bugmaster => apv
2015-04-17 17:26 git Note Added: 0039980
2015-04-17 17:26 apv Note Added: 0039981
2015-04-24 07:01 abv Target Version 6.9.0 => 7.1.0
2015-04-24 07:01 abv Target Version 7.1.0 => 7.0.0
2015-04-24 17:09 git Note Added: 0040223
2015-04-24 17:09 apv Note Added: 0040224
2015-04-27 11:07 apv Note Added: 0040265
2015-04-27 11:07 apv Assigned To apv => azn
2015-04-27 11:07 apv Status reviewed => assigned
2015-04-27 11:07 apv Note Edited: 0040265
2015-04-27 14:40 git Note Added: 0040276
2015-04-27 14:41 azn Note Added: 0040277
2015-04-27 14:42 azn Assigned To azn => apv
2015-04-27 14:42 azn Status assigned => resolved
2015-04-28 16:28 abv Assigned To apv => bugmaster
2015-04-28 16:28 abv Status resolved => reviewed
2015-04-28 16:38 apv Assigned To bugmaster => apv
2015-04-28 16:38 apv Test case number => Not needed
2015-04-28 16:47 apv Note Added: 0040366
2015-04-28 16:47 apv Assigned To apv => bugmaster
2015-04-28 16:47 apv Status reviewed => tested
2015-04-28 17:12 abv Target Version 7.0.0 => 6.9.0
2015-05-07 11:18 bugmaster Changeset attached => occt master 96f3bacc
2015-05-07 11:18 bugmaster Status tested => verified
2015-05-07 11:18 bugmaster Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:27 git Note Added: 0040977