Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023002Open CASCADE[OCCT] OCCT:Application Frameworkpublic2012-02-22 14:352012-04-16 10:49
Assigned Tobugmaster 
PlatformOSOS Version
Product Version[OCCT] 6.5.2 
Target Version[OCCT] 6.5.3Fixed in Version[OCCT] 6.5.3 
Summary0023002: empty delete operator in TDF_LabelNode
DescriptionSince the TDF_LabelNode class is allocated with NCollection_IncAllocator, it should be removed with NCollection_IncAllocator.
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0022815closedbugmaster Community Missing delete operator for placement new 

-  Notes
szy (manager)
2012-03-16 14:55

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.
abv (manager)
2012-03-16 15:18


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).
abv (manager)
2012-04-03 19:58

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
abv (manager)
2012-04-12 12:22

Destruction of TDF_LabelNode class corrected so as to use consistently defined new/delete operators

Branch CR23002 is ready for review
kgv (developer)
2012-04-12 13:28

Patch reviewed without remarks.
mkv (tester)
2012-04-13 12:14

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 [^]

- Related Changesets
occt: master 60d4560d
Timestamp: 2012-04-12 06:25:59
Author: abv
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
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 ]

- Issue History
Date Modified Username Field Change
2012-02-22 14:35 dbv New Issue
2012-02-22 14:35 dbv Assigned To => szy
2012-02-22 14:36 dbv Relationship added related to 0022815
2012-03-16 14:55 szy Note Added: 0020019
2012-03-16 14:55 szy Assigned To szy => abv
2012-03-16 14:55 szy Status new => feedback
2012-03-16 15:18 abv Note Added: 0020020
2012-04-03 19:58 abv Note Added: 0020257
2012-04-03 19:58 abv Status feedback => assigned
2012-04-03 19:58 abv Product Version => 6.5.2
2012-04-03 19:58 abv Target Version => 6.5.3
2012-04-12 12:22 abv Note Added: 0020352
2012-04-12 12:22 abv Assigned To abv => kgv
2012-04-12 12:22 abv 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 mkv Test case number => Not needed
2012-04-13 12:14 mkv Note Added: 0020380
2012-04-13 12:14 mkv Assigned To apn => bugmaster
2012-04-13 12:14 mkv 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

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker