Could you help me to release memory after using following parts of code which are identical to sample Viewer’s code of HOOPS Exchange, TreeTraverse.cpp:
A3DUns32 uNbAnnotationEntity = m_sProductOccurrenceData.m_uiAnnotationsSize;
for (uI = 0; uI < uNbAnnotationEntity; uI++)
{
A3DMkpAnnotationEntityConnector sAnnotationEntityConnector(m_sProductOccurrenceData.m_ppAnnotations[uI]);
sAnnotationEntityConnector.TraverseAnnotationEntity(psVisitor);
}
, and:
for (uI = 0; uI < uNbView; uI++)
{
A3DMkpViewConnector sMkpViewConnector(m_sProductOccurrenceData.m_ppViews[uI]);
sMkpViewConnector.TraverseView(psVisitor);
}
I think it should be done by availabe distructor:
~A3DProductOccurrenceConnector() { A3DAsmProductOccurrenceGet(NULL, &m_sProductOccurrenceData); }
but I collect growing memory leaks with each use. Any hints appreciated.