incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-580) purify reports memory leaked by strstream example
Date Fri, 05 Oct 2007 00:00:53 GMT
purify reports memory leaked by strstream example 
--------------------------------------------------

                 Key: STDCXX-580
                 URL: https://issues.apache.org/jira/browse/STDCXX-580
             Project: C++ Standard Library
          Issue Type: Improvement
          Components: Examples
            Reporter: Travis Vitek
            Assignee: Travis Vitek
            Priority: Minor
             Fix For: 4.2.1
         Attachments: stdcxx-580.patch

The example calls inout.str() which calls freeze(). If the streams streambuf if frozen, the
destructor is not allowed to free the memory [D.7.1.2 p8]. 

****  Purify instrumented ./strstream (pid 21780)  ****
Purify: Searching for all memory leaks...

Memory leaked: 128 bytes (1.15%); potentially leaked: 0 bytes (0%)

MLK: 128 bytes leaked at 0x40027788
  * This memory was allocated from:
	malloc         [rtlib.o]
	__nWa__FuL     [libCsup_v2.2]
	operator new[](unsigned long) [rtlib.o]
	std::strstreambuf::setbuf(char *,long) [strstream.cpp:294]
	std::strstreambuf::overflow(int) [strstream.cpp:85]
	std::basic_streambuf<char,std::char_traits<char>>::xsputn(const char *,long)
[streambuf.cc:144]


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message