For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Memory leak

Vlad Ilchishin's picture
Forums: 

Hello there,

I'm developing an application that uses OCCT to import STEP and IGES. However I have noticed that after couple imports of the same model the amount of memory used by the process keeps growing. After doing some profiling, I have found out the following:

  • The memory that keeps occupied after I'm cleaning everything was allocated in either STEPCAFControl_Reader::ReadFile(string), or Transfer(Handle(TDocStd_Document)) of the same class. If it is important to narrow this suspected methods to one, I can provide that info.
  • After doing required work, I'm calling TDocStd_Document::Close() and STEPCAFControl_Reader::Reader()::ClearShapes(), but that doesn't help
  • The amount of leaked memory is respective to the size of the model.

I am asking for some hints, how to fix this issue. I'm ready to provide any other clarifications if necessary.

Maybe there are some other ways to clean memory that I'm not aware of?

Thank you in advance,

Vlad