c++ - Trimesh - leak memory -


i'm using trimesh library compute curvature on each vertex of triangulated mesh. do, make:

 trimesh *m = trimesh::read(this->fichier);  m->need_curvatures();    float *degres= new float[nbr_vertices];    for(int i=0;i<nbr_vertices;i++)   {     degres[i]=m->curv1[i]; // curvature   }      delete [] degres;  m->clear(); delete m;

the problem leak memory detected clear , delete "* m". leak memory detected "valgrind".

this output of valgrind :

 912 bytes in 3 blocks possibly lost in loss record 5 of 13  ==4239==    @ 0x4c2cc70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)  ==4239==    0x4012e54: _dl_allocate_tls (dl-tls.c:296)  ==4239==    0x5174da0: pthread_create@@glibc_2.2.5 (allocatestack.c:589)  ==4239==    0x599c905: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)  ==4239==    0x4c67d2: trimesh::trimesh::need_normals() (in /home/spin/spin)  ==4239==    0x4b203d: trimesh::trimesh::need_curvatures() 

any idea solve issue ?

thanks.

912 bytes in 3 blocks are possibly lost in loss record 5 of 13

possible loss might caching or pointer tricks , 912 bytes hardly issue. unless it's several megabytes, ignore it, if in library snd not in code.

for issue, should of larger magnitude, , behaviour grows longer runs. if 1 kilobyte per call , doing thousands or millions of times need reported library creator

in short, no evidence of real leak.

run in loop , see if grows without settling off, otherwise can ignore it.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -