View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023002 | Open CASCADE | OCCT:Application Framework | public | 2012-02-22 14:35 | 2012-04-16 10:49 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.5.2 | ||||
Target Version | 6.5.3 | Fixed in Version | 6.5.3 | ||
Summary | 0023002: empty delete operator in TDF_LabelNode | ||||
Description | Since the TDF_LabelNode class is allocated with NCollection_IncAllocator, it should be removed with NCollection_IncAllocator. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Andrey, I address this message to you according history of the issue. I don't see the need to do the requested modifications because according the idea of the author (probably AGV) it is exactly the expected behavior of the memory management of LabelNode. I.e. memory is allocated by IncAllocator held by TDF_Data class and memory is released not by destructors of TDF_LabelNode, but rather by the destructor of TDF_Data. See comments for method LabelNodeAllocator at the TDF_Data.cdl. So, all messages about memory leaks for this case are 'false positive'. I propose just add additional comments for delete operator defined in TDF_LabelNode class. |
|
Sergey, I realize that current implementation works as it is; that is why I have asked Dmitry to register a separate issue for that instead of fixing it in the frames of the original issue. The problem is not in run-time behavior, but in clarity of code: current implementation breaks parity of new/delete operators which should be followed by any class when possible. This makes the code difficult to understand, and modification of the code dangerous. Imagine for instance that someone will allocate TDF_Node by plain new operator... I still believe the code can be improved by using standard set of new/delete operators; just deleteion of nodes should be done from TDF_Data (with allocator as argument to delete) instead of recursive destruction (which is bad on itself). |
|
The current code produces compiler warnings when TDF_Label.hxx header is included in the application code; I suggest we solve the problem in 6.5.3 |
|
Destruction of TDF_LabelNode class corrected so as to use consistently defined new/delete operators Branch CR23002 is ready for review |
|
Patch reviewed without remarks. |
|
Dear BugMaster, Workbench KAS:dev:apn-23002-occt was created from git branch CR23002 (and apn-23002-products from svn trunk) and compiled on Linux platform. There are not regressions in apn-23002-products regarding to KAS:dev:products-20120406-opt There are not improvement in apn-23002-products regarding to KAS:dev:products-20120406-opt See results in /QADisk/occttests/results/KAS/dev/apn-23002-products_12042012/lin See reference results in /QADisk/occttests/results/KAS/dev/products-20120406-opt_07042012/lin See test cases in /QADisk/occttests/tests/ED N.B. In order to launch testing case you can make use the following instructions http://doc/doku.php?id=occt:certification |
occt: master 60d4560d 2012-04-12 06:25:59
Committer: bugmaster Details Diff |
0023002: empty delete operator in TDF_LabelNode Destruction of TDF_LabelNode class corrected so as to use consistently defined new/delete operators |
Affected Issues 0023002 |
|
mod - src/NCollection/NCollection_DefineAlloc.hxx | Diff File | ||
mod - src/TDF/TDF_Data.cxx | Diff File | ||
mod - src/TDF/TDF_Label.cxx | Diff File | ||
mod - src/TDF/TDF_LabelNode.cxx | Diff File | ||
mod - src/TDF/TDF_LabelNode.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-22 14:35 |
|
New Issue | |
2012-02-22 14:35 |
|
Assigned To | => szy |
2012-02-22 14:36 |
|
Relationship added | related to 0022815 |
2012-03-16 14:55 |
|
Note Added: 0020019 | |
2012-03-16 14:55 |
|
Assigned To | szy => abv |
2012-03-16 14:55 |
|
Status | new => feedback |
2012-03-16 15:18 |
|
Note Added: 0020020 | |
2012-04-03 19:58 |
|
Note Added: 0020257 | |
2012-04-03 19:58 |
|
Status | feedback => assigned |
2012-04-03 19:58 |
|
Product Version | => 6.5.2 |
2012-04-03 19:58 |
|
Target Version | => 6.5.3 |
2012-04-12 12:22 |
|
Note Added: 0020352 | |
2012-04-12 12:22 |
|
Assigned To | abv => kgv |
2012-04-12 12:22 |
|
Status | assigned => resolved |
2012-04-12 13:28 | kgv | Note Added: 0020355 | |
2012-04-12 13:28 | kgv | Assigned To | kgv => bugmaster |
2012-04-12 13:28 | kgv | Status | resolved => reviewed |
2012-04-12 13:33 | apn | Assigned To | bugmaster => apn |
2012-04-12 14:41 |
|
Test case number | => Not needed |
2012-04-13 12:14 |
|
Note Added: 0020380 | |
2012-04-13 12:14 |
|
Assigned To | apn => bugmaster |
2012-04-13 12:14 |
|
Status | reviewed => tested |
2012-04-16 10:48 | bugmaster | Changeset attached | => occt master 60d4560d |
2012-04-16 10:49 | bugmaster | Status | tested => verified |
2012-04-16 10:49 | bugmaster | Resolution | open => fixed |