View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025314 | Open CASCADE | OCCT:Coding | public | 2014-10-01 19:46 | 2014-11-11 13:01 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.8.0 | ||||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0025314: Usage of smart pointers for dynamically allocated memory in BVH | ||||
Description | Algorithms implemented in BVH package use simple C pointers allocated with operator new and released with explicit delete. This practice is unsafe and can lead to memory leaks if delete is forgotten (see example of this problem fixed in BVH_SweepPlaneBuilder::BuildNode() in branch CR25159_1, commit 76037d9). Instead, classes providing automatic memory release (smart pointers, e.g. std::auto_ptr<>, or arrays, e.g. NCollection_Array1<>) should be used. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
The same problem (memory leak) seems to be present in BVH_LinearBuilder.lxx, see aLinkMap. Tricks with *new() in the code using TBB in the same file also look suspicious, please check and add appropriate explanatory comment in the code if this is specific to TBB way of life. Note that work with TBB will need to be revised in context of 0024826. |
|
Branch CR25314 has been created by dbp. SHA-1: 30fd13756b18f00bc1c855ce936f04450e101328 Detailed log of new commits: Author: dbp Date: Thu Oct 9 17:17:57 2014 +0400 0025314: Usage of smart pointers for dynamically allocated memory in BVH |
|
Branch CR25314_1 has been created by dbp. SHA-1: af320d54a90314734f96e9a9b7f2e387cb23131c Detailed log of new commits: Author: dbp Date: Thu Oct 9 17:59:01 2014 +0400 0025314: Usage of smart pointers for dynamically allocated memory in BVH |
|
Dear abv, please review the patch in branch CR25314_1. |
|
Branch CR25314_1 has been deleted by dbp. SHA-1: af320d54a90314734f96e9a9b7f2e387cb23131c |
|
Branch CR25314_1 has been created by dbp. SHA-1: 420091f4b0d4959033bfd9aa754e5992927f7abb Detailed log of new commits: Author: dbp Date: Thu Oct 9 18:40:20 2014 +0400 025314: Usage of smart pointers for dynamically allocated memory in BVH |
|
No remarks, please check compilation and integrate. Note that testing is not required since changes are in classes not yet used in other parts of OCCT. |
|
Branch CR25314_1 has been deleted by inv. SHA-1: 420091f4b0d4959033bfd9aa754e5992927f7abb |
|
Branch CR25314 has been deleted by inv. SHA-1: 30fd13756b18f00bc1c855ce936f04450e101328 |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-10-01 19:46 |
|
New Issue | |
2014-10-01 19:46 |
|
Assigned To | => kgv |
2014-10-01 19:47 |
|
Relationship added | related to 0025159 |
2014-10-01 20:08 |
|
Note Added: 0032541 | |
2014-10-01 20:10 |
|
Note Edited: 0032541 | |
2014-10-06 13:12 | kgv | Assigned To | kgv => dbp |
2014-10-06 13:12 | kgv | Status | new => assigned |
2014-10-09 17:18 | git | Note Added: 0032918 | |
2014-10-09 17:59 | git | Note Added: 0032923 | |
2014-10-09 18:00 |
|
Note Added: 0032924 | |
2014-10-09 18:00 |
|
Assigned To | dbp => abv |
2014-10-09 18:00 |
|
Status | assigned => resolved |
2014-10-09 18:40 | git | Note Added: 0032942 | |
2014-10-09 18:40 | git | Note Added: 0032944 | |
2014-10-10 05:58 |
|
Note Added: 0032950 | |
2014-10-10 05:58 |
|
Assigned To | abv => bugmaster |
2014-10-10 05:58 |
|
Status | resolved => reviewed |
2014-10-13 17:52 | bugmaster | Changeset attached | => occt master e3709f1d |
2014-10-13 17:52 | bugmaster | Status | reviewed => verified |
2014-10-13 17:52 | bugmaster | Resolution | open => fixed |
2014-10-21 16:40 | git | Note Added: 0033410 | |
2014-10-21 16:40 | git | Note Added: 0033412 | |
2014-11-11 12:43 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 13:01 |
|
Status | verified => closed |