Hi, while using the library for exporting our meshes i found out that there are a few memory leaks. Investigating the situation i found some. Would be great if you could post here the memory leaks you have found...
In the constructor of ContractionRecorder pFaceUpdatePool and m_pRemoveIndex is created, but in the destructor they arent freed.
ContractionRecorder::ContractionRecorder(CLODGenerator::Params *pParams) { ... numFaceUpdates = INITIAL_FACE_UPDATES_POOL_SIZE; pFaceUpdatePool = new IFXAuthorFaceUpdate[numFaceUpdates]; currVertexUpdate = nv - 1; pCLODUpdates = new IFXAuthorVertexUpdate[nv];
// Grab ptrs to the re-map arrays: vertexMap = pVMap; faceMap = pFMap; U32 i; for ( i = 0; i < outIMesh->GetMaxMeshDesc()->NumFaces; i++) { faceMap[i] = UNDEFINED_INDEX; } m_pRemoveIndex = new U32[nv];
... }
Log in to post a comment.
In the constructor of ContractionRecorder pFaceUpdatePool and m_pRemoveIndex is created, but in the destructor they arent freed.
ContractionRecorder::ContractionRecorder(CLODGenerator::Params *pParams)
{
...
numFaceUpdates = INITIAL_FACE_UPDATES_POOL_SIZE;
pFaceUpdatePool = new IFXAuthorFaceUpdate[numFaceUpdates];
currVertexUpdate = nv - 1;
pCLODUpdates = new IFXAuthorVertexUpdate[nv];
// Grab ptrs to the re-map arrays:
vertexMap = pVMap;
faceMap = pFMap;
U32 i;
for ( i = 0; i < outIMesh->GetMaxMeshDesc()->NumFaces; i++)
{
faceMap[i] = UNDEFINED_INDEX;
}
m_pRemoveIndex = new U32[nv];
...
}