|
From: Mathieu M. <mma...@ny...> - 2004-11-15 01:41:15
|
Hello, Does anyone knows if I should worry about a leak due to the use of ostringstream ? Please note that I am using GLIBCPP_FORCE_NEW (gcc 3.3.4 debian testing). Here is the dump: ==14287== 723 bytes in 33 blocks are possibly lost in loss record 9 of 9 ==14287== at 0x1B90706F: operator new(unsigned) (vg_replace_malloc.c:133) ==14287== by 0x1CF595F8: std::__default_alloc_template<true, 0>::allocate(unsigned) (in /usr/lib/libstdc++.so.5.0.7) ==14287== by 0x1CF5EFF7: std::string::_Rep::_S_create(unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.5.0.7) ==14287== by 0x805ED04: char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) (basic_string.tcc 0) ==14287== by 0x805EC77: char* std::string::_S_construct_aux<char*>(char*, char*, std::allocator<char> const&, __false_type) (basic_string.h:670) ==14287== by 0x805EC51: char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&) (basic_string.h:687) ==14287== by 0x805DAA0: std::string::string<char*>(char*, char*, std::allocator<char> const&) (basic_string.tcc:241) ==14287== by 0x805DA0F: std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const (sstream:145) ==14287== by 0x805CDE1: std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const (sstream:502) ==14287== by 0x1BD54863: gdcm::Document::LoadDocEntry(gdcm::DocEntry*) (gdcmDocument.cxx:1675) ==14287== by 0x1BD53591: gdcm::Document::ParseDES(gdcm::DocEntrySet*, long, long, bool) (gdcmDocument.cxx:1368) ==14287== by 0x1BD4FFF0: gdcm::Document::Document(std::string const&) (gdcmDocument.cxx:115) ==14287== by 0x1BD6004E: gdcm::Header::Header(std::string const&) (gdcmHeader.cxx:39) ==14287== by 0x8053A66: TestBug(int, char**) (TestBug.cxx:16) ==14287== by 0x805385E: main (gdcmTests.cxx:204) The only link I could find in google was: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12094 Thanks Mathieu Ps: there used to be a s.rdbuf()->freeze(0) in the old sstream but not anymore in ostringstream... |