Hi,
We use the SketchUp 2016 C SDK for importing SKP files into our ARCHICAD software and we found that SUModelGetStatistics() function has a memory leak (32 bytes).
The leak log registered by our memory detection:
…
SUModelGetStatistics
CComponentStatistics::ReCalculateStats()
CComponentStatistics::CalcClassificationStats()
CDefinitionList::GetIterator()
operator new(unsigned long)
…
So somewhere in the CDefinitionList::GetIterator() method something is created which is not freed later.
The minimal code with which we can detect this problem:
…
SUInitialize ();
SUModelRef model = SU_INVALID;
SUModelCreateFromFile (&model, “testfile.skp”);
SUModelStatistics statistics;
SUModelGetStatistics (model, &statistics);
SUModelRelease (&model);
SUTerminate ();
…
It comes up with all models tested, so I guess its a general problem.
Best Regards,
Tamás