stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <>
Subject [jira] Created: (STDCXX-579) purify reports memory leaked by strstreambuf example
Date Thu, 04 Oct 2007 23:19:50 GMT
purify reports memory leaked by strstreambuf example

                 Key: STDCXX-579
             Project: C++ Standard Library
          Issue Type: Bug
          Components: Examples
            Reporter: Travis Vitek
            Assignee: Travis Vitek
            Priority: Minor
             Fix For: 4.2.1

The example calls out.rdbuf()->str() which calls freeze(). If the buffer if frozen, the
destructir is not allowed to free the memory [D.7.1.2 p8].

****  Purify instrumented ./strstreambuf (pid 27069)  ****
Purify: Searching for all memory leaks...

Memory leaked: 200 bytes (100%); potentially leaked: 0 bytes (0%)

MLK: 200 bytes leaked at 0x80c01d8
  * This memory was allocated from:
	malloc         [rtlib.o]
	operator new(unsigned) []
	operator new [](unsigned) []
	std::strstreambuf::setbuf(char*, int) [strstream.cpp:292]
	std::basic_streambuf<char, std::char_traits<char> >::pubsetbuf(char*, int) [streambuf:91]
	main           [strstreambuf.cpp:78]

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

View raw message