From: Robert Dober Date: 2011-07-30T17:14:36+09:00 Subject: Re: avoiding capturing local variables in closures Answered by Michael > Further, what if I have an instance var that is referencing some large data? Do I need to worry >about that being captured by the block or does it not matter because the block has already >captured self? At first sight you need to worry if you pass the block to a method outside of the receiver because that will create a new reference to "self". As long as you pass the block around in the same object I do not see an issue. HTH Robert > > [1] http://ola-bini.blogspot.com/2007/12/ruby-closures-and-memory-usage.html > > > -- I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing. -- Alain Kay