Could someone help me? I used BRepBuilderAPI_Sewing in my application, to sew some faces, it works fine but it takes a lot of memory.
I executed my application with valgrind and I got this error:
==8650== 6,151,632 (66,144 direct, 6,085,488 indirect) bytes in 106 blocks are definitely lost in loss record 77,455 of 77,455
==8650== at 0x4A05140: calloc (vg_replace_malloc.c:418)
==8650== by 0x845298C: Standard_MMgrRaw::Allocate(unsigned long) (in /OpenCASCADE/ros/lib/libTKernel.so.0.0.0)
==8650== by 0xE81A89E: Standard_Transient::operator new(unsigned long) (Standard_Transient_proto.hxx:38)
==8650== by 0xE81ED6A: ROpenCC::CreateFaces(double*, int*, int) (ROpenCC.cxx:714)
==8650== by 0xE818465: OCCStep::BasicShape() (OCCStep.cxx:612)
==8650== by 0xE81955F: OCCStep::CreateOCCGeom() (OCCStep.cxx:134)
==8650== by 0xE819795: OCCStep::ReadRootGeom(char*) (OCCStep.cxx:171)
It is a memory leak.
In my code I just do:
BRepBuilderAPI_Sewing * sewing= new BRepBuilderAPI ();
So I used it to sew some faces and then I did:
But nothing change, after that the memory is not free!
what's wrong in my code??