On Mon, Jan 14, 2013 at 11:54 PM, Na Na <[email protected]> wrote: > At > http://www.web-l.nl/posts/15-tuning-ruby-s-garbage-collector-with-rvm-and-passenger > under option 2, the discussion led me to believe that the writer thought > changing those from for-in to each would help.
First of all that's the opposite of what you wrote initially. Then the author doesn't really track down the "relief" to the different looping style (he also changed to "render @model"). > I did some reading for a description on the difference between those > two, and it did indeed only mention scope as the difference. I couldn't > understand why that would lead to additional object creation. Can you show a use case you have in mind? The only memory relevant issue I can see would be allocating and releasing of additional local variables - but not objects. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- [email protected] | https://groups.google.com/d/forum/ruby-talk-google?hl=en
