From: Hugh Sasse Date: 2005-09-14T20:37:10+09:00 Subject: Re: Optimizing a single slow method On Wed, 14 Sep 2005, Robert Klemme wrote: > Hugh Sasse wrote: >>> see an associated block, it doesn't handle the cleanup for you. >> >> Yes, that's right. I wonder if it is worth the price in garbage >> collection to explicitly close in this case? Probably not given >> maintenance costs. > > The closing isn't that costly. The closing would allow you to avoid that block with the |io| in it. That cost, the cost of the object, is what I meant. > And if you later change the script you > might run into errors when omitting proper closing of file descriptors. I Hence my remark about maintenance costs. > made it a habit to always use the block form (except where not applicable > for application reasons). That way you're always on the safe side. Agreed > > Kind regards > > robert Hugh