Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 33618 invoked from network); 5 Oct 2007 13:37:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 13:37:22 -0000 Received: (qmail 80630 invoked by uid 500); 5 Oct 2007 13:37:10 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 80611 invoked by uid 500); 5 Oct 2007 13:37:10 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 80600 invoked by uid 99); 5 Oct 2007 13:37:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 06:37:10 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 13:37:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2579C71422B for ; Fri, 5 Oct 2007 06:36:54 -0700 (PDT) Message-ID: <25249474.1191591414151.JavaMail.jira@brutus> Date: Fri, 5 Oct 2007 06:36:54 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-579) purify reports memory leaked by strstreambuf example In-Reply-To: <18952878.1191539990849.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532656 ] Farid Zaripov commented on STDCXX-579: -------------------------------------- It is not so important, but why "out.rdbuf ()->freeze (false)" and not just "out.freeze (false)"? I suppose that out.rdbuf () used for consistency with the other using of the out.rdbug() in the example, right? > 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 > 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 >::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.