Thank you.

One of my colleagues ran valgrind (memory profiler) on the following snippet:

Help with Code Tags
c++ Syntax (Toggle Plain Text)
#include <string>
class s{
std::string ss;
public:
s(){ throw -1;}
};
int main( int argc, char **v)
{
s s1;
}

Valgrind reported that a memory leak is possible. Is valgrind misreading this?

==31452== Memcheck, a memory error detector.
==31452== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==31452== Using LibVEX rev 1658, a library for dynamic binary translation.
==31452== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==31452== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==31452== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==31452== For more details, rerun with: -v
==31452==
terminate called after throwing an instance of 'int'
==31452==
==31452== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 from 1)
==31452== malloc/free: in use at exit: 84 bytes in 1 blocks.
==31452== malloc/free: 2 allocs, 1 frees, 89 bytes allocated.
==31452== For counts of detected errors, rerun with: -v
==31452== searching for pointers to 1 not-freed blocks.
==31452== checked 88,716 bytes.
==31452==
==31452== LEAK SUMMARY:
==31452== definitely lost: 0 bytes in 0 blocks.
==31452== possibly lost: 0 bytes in 0 blocks.
==31452== still reachable: 84 bytes in 1 blocks.
==31452== suppressed: 0 bytes in 0 blocks.
==31452== Reachable blocks (those to which a pointer was found) are not shown.
==31452== To see them, rerun with: --show-reachable=yes