public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Carlo Wood <carlo@alinoe.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libstdc++/6246: gcc generates code that memleaks Date: Sun, 14 Apr 2002 18:56:00 -0000 [thread overview] Message-ID: <20020415015601.21477.qmail@sources.redhat.com> (raw) The following reply was made to PR libstdc++/6246; it has been noted by GNATS. From: Carlo Wood <carlo@alinoe.com> To: Clemens Kirchgatterer <clemens@thf.ath.cx> Cc: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/6246: gcc generates code that memleaks Date: Mon, 15 Apr 2002 03:51:05 +0200 On Sat, Apr 13, 2002 at 08:29:34AM +0200, Clemens Kirchgatterer wrote: > hmm, this is very strange, as it is NOT gcc's fault, but mine. > > *buf += str.str(); <-- this freazes the buffer and returns a > pointer to it. the caller is now > responsible for freeing it with delete(). No it doesn't, not since 3.0 which is conforming to the standard and where str() returns a std::string. Use std::stringstream, not std::strstream. -- Carlo Wood <carlo@alinoe.com>
next reply other threads:[~2002-04-15 1:56 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-14 18:56 Carlo Wood [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-04-12 23:36 Clemens Kirchgatterer 2002-04-12 19:02 rodrigc
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020415015601.21477.qmail@sources.redhat.com \ --to=carlo@alinoe.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).