MantisBT - Community
View Issue Details
0030603Community[OCCT] OCCT:Modeling Datapublic2019-03-25 13:532019-07-08 14:09
closedno change required 
[OCCT] 7.3.0 
[OCCT] 7.4.0 
0030603: Memory Leaks in Geom_BSplineCurve
When compiling my program with "-fsanitize=address -fsanitize-recover=address -fsanitize=undefined", I get quite a lot of "Direct leak of ... byte(s) ..." messages regarding Geom_BSplineCurve.cxx when running.

The leaks stem from allocations in the lines 148, 152, 155, 204, 211, 214, 445, 1129 (line numbers refer to commit 9775fa611, the file has changed in the meantime). At a first look it seems as all of these warnings were justified.
No tags attached.
related to 0026698assigned isn Open CASCADE Coding - Avoid usage of non-guarded pointers to dynamically allocated memory 
child of 0030557new kgv Open CASCADE Coding - eliminate errors reported by -fsanitize 
Issue History
2019-03-25 13:53BenjaminBihlerNew Issue
2019-03-25 13:53BenjaminBihlerAssigned To => msv
2019-03-25 14:03BenjaminBihlerRelationship addedrelated to 0026698
2019-03-25 14:09kgvRelationship addedchild of 0030557
2019-06-21 17:09msvNote Added: 0085206
2019-06-21 17:09msvAssigned Tomsv => BenjaminBihler
2019-06-21 17:09msvStatusnew => feedback
2019-07-01 11:00BenjaminBihlerNote Added: 0085364
2019-07-01 11:00BenjaminBihlerAssigned ToBenjaminBihler => msv
2019-07-01 12:13msvAssigned Tomsv => bugmaster
2019-07-01 12:13msvNote Added: 0085368
2019-07-08 14:08bugmasterStatusfeedback => closed
2019-07-08 14:08bugmasterResolutionopen => fixed
2019-07-08 14:09bugmasterResolutionfixed => no change required

2019-06-21 17:09   
There is no enough info for debug memory leaks.

The pointed lines refer to allocation of bspline data that are destructed at curve destruction (all they are stored in handles).

It may be a leak if you create a curve and then it is stored in some other (static) variable.

In order to check if it is a real leak you needed to create quite large number of curves, then destroy them, and see how much memory application uses. Then repeat this action several times to see if the used memory increases.
2019-07-01 11:00   
You are completely right, the member fields are handles. I had missed that and therefore have been mislead by the warning messages. Sorry.

I propose to close the issue.
2019-07-01 12:13   
Please close.