apply the following fix, with a mildly descriptive comment: ------------------ Hi,
apply the following fix, with a mildly descriptive comment:
------------------
Hi,

TriMesh for temporal coherence uses ODE's dArray of SphereTC and BoxTC
classes. These in turn are derived from OPCODE classes, and contain
IceCore::Container that has a non-trivial destructor.

Now, dxTriMesh::ClearTCCache uses dArray's setSize(0) to clear the caches -
but the destructor isn't called. So, each ClearTCCache leaks previous
caches' containers.

A quick dirty fix is to call destructors by hand:

void dxTriMesh::ClearTCCache(){
    int i, n;
    n = SphereTCCache.size();
    for( i = 0; i < n; ++i ) {
        SphereTCCache[i].~SphereTC();
    }
    SphereTCCache.setSize(0);
    n = BoxTCCache.size();
    for( i = 0; i < n; ++i ) {
        BoxTCCache[i].~BoxTC();
    }
    BoxTCCache.setSize(0);
}


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/


forrestv/opende,forrestv/opende,forrestv/opende,forrestv/opende,forrestv/opende