DiscussionsIssue archiveOCCT:Modeling Data

Archived issue #0030603

Memory Leaks in Geom_BSplineCurve

CommunityOCCT:Modeling Dataclosed3 public notes

Search issues

Description

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 [revision removed], the file has changed in the meantime). At a first look it seems as all of these warnings were justified.

Public activity

3 archived notes

Participants are labeled by their role within this record.

01Commenter 1
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.
02Author
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.
03Commenter 3
Please close.

Related records