1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| bruno@linux-ysqo:/tmp> valgrind ./a.out
==4557== Memcheck, a memory error detector.
==4557== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==4557== Using LibVEX rev 1732, a library for dynamic binary translation.
==4557== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==4557== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==4557== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==4557== For more details, rerun with: -v
==4557==
------------ ATOME 1 -----------
Adresse creation : 0xbefede9c
Mole-> Atomes : 1
Add Atom : 0xbefede9c
Atoms.push_back : 0xbefede9c
Nombre d'element: 1
Mole->Atomes vide : 0
Add Atom : 0xbefede98
Atoms.push_back : 0xbefede98
Nombre d'element: 2
Mole->Atomes vide : 0
Hello, World!
Liste adresse atome contains: 0xbefede9c 0xbefede98
Suppr
==4557== Invalid free() / delete / delete[]
==4557== at 0x4022156: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==4557== by 0x8048E42: MolBase::~MolBase() (MolBase.cpp:14)
==4557== by 0x804A101: main (Main.cpp:15)
==4557== Address 0xBEFEDE98 is on thread 1's stack
Liste adresse atome contains: 0xbefede9c
Suppr
Liste adresse atome contains:
Suppr
Suppr
==4557==
==4557== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 3 from 1)
==4557== malloc/free: in use at exit: 0 bytes in 0 blocks.
==4557== malloc/free: 2 allocs, 4 frees, 12 bytes allocated.
==4557== For counts of detected errors, rerun with: -v
==4557== All heap blocks were freed -- no leaks are possible. |
Partager