Re: [Patch] String and (repost) MemLeak

From: matz@... (Yukihiro Matsumoto)
Date: 2003-03-04 09:27:16 UTC
List: ruby-core #912
Hi,

In message "Re: [Patch] String and (repost) MemLeak"
    on 03/03/04, Michal Rokos <michal@rokos.homeip.net> writes:

|> I consider (or designed) str_new(0, len) as allocation of string
|> buffer, so that I think garbage is OK, just like malloc().
|
|You're probably right - if programmer wants garbage he gets it... But I
|still think that setting proper len cost nothing and could make some
|tired programmers happier.

Cost is nothing, I agree.  But if a programmer gets a zero length
string even when I specified len to str_new(), he/she may confuse
sometimes.

							matz.

In This Thread