Menu

#14 Memory Leaks

open
nobody
None
9
2011-09-30
2011-09-30
No

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...

Discussion

  • Rainer Müller

    Rainer Müller - 2011-09-30

    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];

    ...
    }

     
  • Rainer Müller

    Rainer Müller - 2011-09-30
    • priority: 5 --> 9
     

Log in to post a comment.