You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/11/12 15:46:50 UTC
[jira] Closed: (STDCXX-579) purify reports memory leaked by
strstreambuf example
[ https://issues.apache.org/jira/browse/STDCXX-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farid Zaripov closed STDCXX-579.
--------------------------------
> 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: Improvement
> Components: Examples
> Affects Versions: 4.2.0
> 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.