Menu

#19 Trimesh Memory Leaks

Needs_Feedback
closed
Bug Fix (53)
5
2012-09-14
2005-10-23
No

From: Geoff Carlton
Date: Mon Apr 25 16:07:50 2005
Subject: [ODE] Re: Memory leak from dBodySetPosition()?

Trimesh has some static caches that need to be cleared.
Try adding a
function in trimesh.cpp that is called during dCloseODE.

void dClearTrimeshCaches(void)
{

dxTriMesh::defaultSphereCache.TouchedPrimitives.Empty();
dxTriMesh::defaultBoxCache.TouchedPrimitives.Empty();

dxTriMesh::defaultCCylinderCache.TouchedPrimitives.Empty();
dxTriMesh::Faces.Empty();
}

I thought I submitted a patch for this, but it turns
out I haven't.
Assuming it fixes your allocations, its probably a good
idea for this to
go in the unstable branch.

Geoff

Discussion

  • Jason Perkins

    Jason Perkins - 2005-11-11

    Logged In: YES
    user_id=1683

    Last time I checked this was still a problem in both
    branches of CVS. I need to do more research to see if it has
    been fixed.

     
  • Remi Ricard

    Remi Ricard - 2006-02-14

    Logged In: YES
    user_id=145206

    Hi,

    In the unstable branch there is a fix for a memory leak.

    In collision_trimesh_ccylinder.cpp

    if (! Collider.GetContactStatus()) {
    // no collision occurred

    • delete[] gLocalContacts;
      return 0;
      }

    You can check if this solves your problem.

    Remi

     
  • Anonymous

    Anonymous - 2007-01-11

    Logged In: YES
    user_id=1481948
    Originator: NO

    The leak fixes described by Geoff were added in SVN #1132, I must have forgotten to close this patch at the time.

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB