View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026625 | Community | OCCT:Visualization | public | 2015-09-01 16:03 | 2016-06-02 22:12 |
Reporter | dc | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.8.0 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026625: Possible wrong use of vtkSmartPointer<T> in IVtkVTK_ShapeData.cxx | ||||
Description | In the constructor of the class there are several invocations in this form: vtkSmartPointer<vtkObject> MyObject = vtkObject::New() However according to the vtk wiki this may be wrong. http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers Excerpt: #include <vtkSmartPointer.h> Then you can create an object as follows: vtkSmartPointer<vtkObject> MyObject = vtkSmartPointer<vtkObject>::New(); Note the special syntax on the right of the assignment. One almost never wants to assign a raw object pointer to a smart pointer, as is done here: vtkSmartPointer<vtkObject> MyObject = vtkObject::New(); This is almost always a coding error, because the reference count is incremented, requiring an explicit Delete later. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Branch CR26625 has been created by rkv. SHA-1: f728c562d3ff912ecbbd9c90e8ec470ab15ac9f8 Detailed log of new commits: Author: rkv Date: Mon Nov 9 17:49:42 2015 +0300 0026625: Possible wrong use of vtkSmartPointer<T> in IVtkVTK_ShapeData.cxx Use vtkSmartPointer<XXX>::New() instead of XXX::New() when initializing fields of vtkSmartPointer<XXX> types. |
|
No remarks, please test compilation and integrate (if testing, run VTK tests only) |
|
Branch CR26625 has been updated forcibly by apv. SHA-1: d8d12874143001411621d00d8abb1be17404469b |
|
Branch CR26625 has been rebased on the current master |
|
Dear BugMaster, Branch CR26625 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms. SHA-1: d8d12874143001411621d00d8abb1be17404469b Number of compiler warnings: occt component: Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS: 129 (129 on master) products component: Linux: 39 (39 on master) Windows: 0 (0 on master) |
|
Branch CR26625 has been deleted by kgv. SHA-1: d8d12874143001411621d00d8abb1be17404469b |
occt: master c16915c7 2015-11-09 14:49:42
Committer: bugmaster Details Diff |
0026625: Possible wrong use of vtkSmartPointer<T> in IVtkVTK_ShapeData.cxx Use vtkSmartPointer<XXX>::New() instead of XXX::New() when initializing fields of vtkSmartPointer<XXX> types. |
Affected Issues 0026625 |
|
mod - src/IVtkVTK/IVtkVTK_ShapeData.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-09-01 16:03 | dc | New Issue | |
2015-09-01 16:03 | dc | Assigned To | => ski |
2015-11-08 22:17 |
|
Assigned To | ski => rkv |
2015-11-08 22:17 |
|
Status | new => assigned |
2015-11-08 22:17 |
|
Target Version | => 7.0.0 |
2015-11-09 17:50 | git | Note Added: 0047960 | |
2015-11-09 17:51 |
|
Assigned To | rkv => kgv |
2015-11-09 17:51 |
|
Status | assigned => resolved |
2015-11-09 17:51 |
|
Steps to Reproduce Updated | |
2015-11-17 12:39 | kgv | Assigned To | kgv => abv |
2015-11-18 15:39 |
|
Note Added: 0048354 | |
2015-11-18 15:39 |
|
Assigned To | abv => bugmaster |
2015-11-18 15:39 |
|
Status | resolved => reviewed |
2015-11-18 16:48 |
|
Assigned To | bugmaster => apv |
2015-11-18 17:01 | git | Note Added: 0048357 | |
2015-11-18 17:02 |
|
Note Added: 0048358 | |
2015-11-19 17:38 |
|
Note Added: 0048388 | |
2015-11-19 17:39 |
|
Assigned To | apv => bugmaster |
2015-11-19 17:40 | bugmaster | Test case number | => Not needed |
2015-11-19 17:40 | bugmaster | Status | reviewed => tested |
2015-11-27 12:21 | bugmaster | Changeset attached | => occt master c16915c7 |
2015-11-27 12:21 | bugmaster | Status | tested => verified |
2015-11-27 12:21 | bugmaster | Resolution | open => fixed |
2016-04-17 14:14 | git | Note Added: 0053096 | |
2016-04-20 15:42 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:50 |
|
Status | verified => closed |
2016-06-02 22:12 |
|
Relationship added | parent of 0027567 |