elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


  Mostrar Mensajes
Páginas: [1]
1  Programación / Programación C/C++ / Memory Leak en código en: 1 Noviembre 2014, 09:54 am
Hola, mi problema es que tengo un código en C++ y he pasado el Valgrind para si habia memory leaks y efectivamente hay, lo que no sé es encontrarlos. SI me pudierais hechar una manita os lo agredeceria.

http://pastebin.com/ajsuZjKq es el código del main
http://pastebin.com/TFWCt8ah es el código del source

A continuación os dejo el mensaje del Valgrind:

Citar
==2722== 252 (144 direct, 108 indirect) bytes in 9 blocks are definitely lost in loss record 2 of 2
==2722== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2722== by 0x4011C7: sub(vector*, vector*) (in /home/yeray/Escritorio/164324_164376/p1)
==2722== by 0x40155E: distance(vector*, vector*) (in /home/yeray/Escritorio/164324_164376/p1)
==2722== by 0x401BCB: determinar_operacion(char*, vector**) (in /home/yeray/Escritorio/164324_164376/p1)
==2722== by 0x401DB0: main (in /home/yeray/Escritorio/164324_164376/p1)

Muchas gracias :)
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines