I think you are confusing strstream with string.
With strstream if you call .str(), you must call
delete on the string, or call freeze(0). I have never
seen a problem with g++ and string .c_str() leaking memory.
-Bill
At 08:08 AM 3/21/2003, Pavel Tsekov wrote:
>On 21 Mar 2003, Robert Collins
On 21 Mar 2003, Robert Collins wrote:
> this may well. Look in the g++ library for freeze() (again, IIRC). The
> thing I saw when I was reading the source, was that the internal buffer
> was not delete[]'d once it was handed out via c_str(). That was with the
> libstc++ for gcc 2.95 as well. I've
Robert Collins wrote:
> On Fri, 2003-03-21 at 23:12, Alex Tibbles wrote:
>>
>>
>>> I don't care whether you use std::string, or
>>> String++ for any new code,
>>> as long as:
>>> 1) You don't leak memory (std::string will leak if
>>> you use c_str())
>>> IIRC.
>>
>> I've been unable to confirm t
On Fri, 2003-03-21 at 23:12, Alex Tibbles wrote:
>
>
> > I don't care whether you use std::string, or
> > String++ for any new code,
> > as long as:
> > 1) You don't leak memory (std::string will leak if
> > you use c_str())
> > IIRC.
>
> I've been unable to confirm this. I tried the attached
>
On Fri, 21 Mar 2003, Alex Tibbles wrote:
> > I don't care whether you use std::string, or
> > String++ for any new code,
> > as long as:
> > 1) You don't leak memory (std::string will leak if
> > you use c_str())
> > IIRC.
>
> I've been unable to confirm this. I tried the attached
> program (comp
> I don't care whether you use std::string, or
> String++ for any new code,
> as long as:
> 1) You don't leak memory (std::string will leak if
> you use c_str())
> IIRC.
I've been unable to confirm this. I tried the attached
program (compiled with gcc -lstdc++ stringleak.cpp)
and got the followi
gt;
> Is one of String and std::string deprecated as far as setup is concerned?
>
> Are there any features String has but std::string does not?
>
> Should I add the needed functionality to String, or convert all relevant
> parts of setup away from String, to std::string?
libgeto
Pavel Tsekov wrote:
> On Sun, 16 Mar 2003, Max Bowsher wrote:
>
Are there any features String has but std::string does not?
>>>
>>> Except for casecompare() I think not. Of course you can perform
>>> caseless comparison with std::string. It's just a bit tricky :).
>>> Hint: char_traits.
>>
>>
On Sun, 16 Mar 2003, Max Bowsher wrote:
> >> Are there any features String has but std::string does not?
> >
> > Except for casecompare() I think not. Of course you can perform
> > caseless comparison with std::string. It's just a bit tricky :).
> > Hint: char_traits.
>
> What fun. I think it's
>> has the necessary functionality.
>>
>> Is one of String and std::string deprecated as far as setup is
>> concerned?
>>
>> Are there any features String has but std::string does not?
>
> Except for casecompare() I think not. Of course you can perf
On Sun, 16 Mar 2003, Max Bowsher wrote:
> I've been toying with some ideas for UserSetting persistence in setup.conf,
> and have run into the following issue:
>
> String, from String++.* lacks some functionality I need. std::string has the
> necessary functionality.
>
>
I've been toying with some ideas for UserSetting persistence in setup.conf,
and have run into the following issue:
String, from String++.* lacks some functionality I need. std::string has the
necessary functionality.
Is one of String and std::string deprecated as far as setup is concerned?
12 matches
Mail list logo