﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	revision
332	Valgrind reports memory leak in arg_parser_demo	Alpar Juttner	Alpar Juttner	"{{{
$ valgrind --leak-check=full ./arg_prser_demo
==4205== Memcheck, a memory error detector
==4205== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==4205== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==4205== Command: ./arg_parser_demo
==4205== 
./arg_parser_demo: The following mandatory arguments are missing.
  -n int
     An integer input.
./arg_parser_demo: At least one of the following arguments is mandatory.
  -gra
     Choice A
  -grb
     Choice B
  -grc
     Choice C

Type './arg_parser_demo --help' to obtain a short summary on the usage.

==4205== 
==4205== HEAP SUMMARY:
==4205==     in use at exit: 1,373 bytes in 52 blocks
==4205==   total heap usage: 57 allocs, 5 frees, 1,441 bytes allocated
==4205== 
==4205== 154 bytes in 7 blocks are possibly lost in loss record 20 of 21
==4205==    at 0x4027400: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4205==    by 0x40EDA64: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.12)
==4205==    by 0x80496D6: main (arg_parser_demo.cc:33)
==4205== 
==4205== 503 bytes in 26 blocks are possibly lost in loss record 21 of 21
==4205==    at 0x4027400: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==4205==    by 0x40EDA64: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.12)
==4205==    by 0x41AAACD: (below main) (in /lib/libc-2.10.1.so)
==4205== 
==4205== LEAK SUMMARY:
==4205==    definitely lost: 0 bytes in 0 blocks
==4205==    indirectly lost: 0 bytes in 0 blocks
==4205==      possibly lost: 657 bytes in 33 blocks
==4205==    still reachable: 716 bytes in 19 blocks
==4205==         suppressed: 0 bytes in 0 blocks
==4205== Reachable blocks (those to which a pointer was found) are not shown.
==4205== To see them, rerun with: --leak-check=full --show-reachable=yes
==4205== 
==4205== For counts of detected and suppressed errors, rerun with: -v
==4205== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 5 from 5)
}}}"	defect	closed	major	LEMON 1.2 release	core	hg main	fixed			a2d5fd4c309a
