Re: [Patch] String and (repost) MemLeak
From:
Michal Rokos <michal@...>
Date:
2003-03-04 09:19:14 UTC
List:
ruby-core #911
Hi, Yukihiro Matsumoto wrote: > In message "Re: [Patch] String and (repost) MemLeak" > on 03/03/03, Michal Rokos <michal@rokos.homeip.net> writes: > > | I think it's better to make str_new smart rather than say "I'm > |happy with garbage". Ruby's C level is just great and makes programmers > |live happier so I think we should continue this direction and fix the > |len as well. (Of course, you're boss - so you decide.) > > 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. > | I'll commit whatever you want. > > I already merged the memleak fix. Thank you. Oh - great. Thank you. Michal