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] Updated: (STDCXX-579) purify reports memory leaked by strstreambuf example
Date Thu, 04 Oct 2007 23:25:50 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Travis Vitek updated STDCXX-579:
--------------------------------

    Attachment: stdcxx-579.patch

2007-10-04  Travis Vitek  <vitek@roguewave.com>

	STDCXX-579
	* strstreambuf.cpp (main): Unfreeze streambuf so destructor
	will deallocate memory.

> purify reports memory leaked by strstreambuf example
> ----------------------------------------------------
>
>                 Key: STDCXX-579
>                 URL: https://issues.apache.org/jira/browse/STDCXX-579
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Examples
>            Reporter: Travis Vitek
>            Assignee: Travis Vitek
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-579.patch
>
>
> 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) [libstd15d.so]
> 	operator new [](unsigned) [libstd15d.so]
> 	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.


Mime
View raw message