#include "sstream"
using namespace std;
int main(){
   stringstream ss;
   return 0;
}

Why does the above cause this 'bug'?

==4249== Invalid free() / delete / delete[]
==4249==    at 0x40052EA: operator delete(void*, std::nothrow_t const&)
(vg_replace_malloc.c:354)
==4249==    by 0x5544058: std::__verify_grouping(char const*, unsigned,
std::string const&) (locale_facets.cc:108)
==4249==    by 0x5544F8C: std::locale::_Impl::_Impl(char const*, unsigned)
(localename.cc:218)
==4249==    by 0x554500C: std::locale::_Impl::_Impl(char const*, unsigned)
(localename.cc:206)
==4249==    by 0x5546137: std::locale::locale() (localename.cc:88)
==4249==    by 0x5540B9B: std::ios_base::ios_base() (locale.cc:378)
==4249==    by 0x557EAA4: std::basic_stringstream<char,
std::char_traits<char>, std::allocator<char>
>::basic_stringstream(std::_Ios_Openmode) (istream:586)
==4249==    by 0x804863E: main (/home/me/Desktop/new_play/bug.cpp:4)
==4249==  Address 0x55dd188 is not stack'd, malloc'd or (recently) free'd 
-- 
View this message in context: 
http://www.nabble.com/Does-creating-a-stringstream-object-cause-a-leak-tp23370849p23370849.html
Sent from the Valgrind - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to