[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: std::string memory leak?
From: |
Carlos Martinez |
Subject: |
Re: std::string memory leak? |
Date: |
15 Feb 2007 03:58:54 -0800 |
User-agent: |
G2/1.0 |
On 15 feb, 12:52, "Carlos Martinez" <carlos.mt...@gmail.com> wrote:
> Hi all:
>
> I have a possible memory leak.
> I use rational's purify to detect memory leaks, and it indicates a
> memory leak in a temporary of std::string.
>
> I have read somewhere that some memory leaks aren't memory leaks at
> all. It seams it could be the memory pool used by the stl.
> I have test with and without GLIBCPP_FORCE_NEW environment variable
> enabled, and in both cases there is the memory leak.
> I assume it's a memory leak, because without purify, processes grows
> up in memory usage indefinitely and because if I change std::string
> for my own very, very basic implementation of string, it disappears
> (no memory growth nor memory leak indication by purify)
>
> Thanks in advance
The process, processes operations, and even all operations are the
same, not always appears memory leak. This suggest, there isn't a
memory leak and enforce the theroy of a memory pool consecuence, but i
don't understand it because process in memory grows indefinitely if i
use std::string