From: Logan Capaldo Date: 2007-08-06T09:57:16+09:00 Subject: Re: How to reclaim memory without GC.start ------=_Part_66529_27241676.1186361839138 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/4/07, Erik Veenstra wrote: > > > buffer = "." * 1024 > > while STDIN.read(1024, buffer) > > print buffer > > end > > What's the point of initializing the buffer with 1024 characters, > instead of just initializing it with an empty string? I must be > missing something... > > Thanks. I think the idea was to do the allocation upfront instead of when witting to the string. But since that will only happen once, (on the first read) it seems unnecessary. But I could be wrong. gegroet, > Erik V. > > > ------=_Part_66529_27241676.1186361839138--