[MacRuby-devel] [MacRuby] #408: leaked Tempfile don't get cleaned up (MacRuby)

Matthias Neeracher neeracher at apple.com
Thu Oct 29 12:18:20 PDT 2009


> #408: leaked Tempfile don't get cleaned up
[...]
> Changes (by lsansonetti@?):
>
>  * status:  new => closed
>  * resolution:  => fixed
>
> I implemented ObjectSpace finalizers as part of r2918 and now your  
> snippet
> behaves like the old Ruby.

This does indeed fix the main problem—the program running out of file  
descriptors. Thanks!

The behavior still differs significantly from Ruby 1.8 behavior  
(though it may match 1.9 this regard): When running the program I  
included in the bug to completion, the ruby 1.8 version will clean up  
all temp files, while the MacRuby version will leave behind dozens of  
temp files (everything created after the last gc run). Presumably, one  
could force this cleanup by running gc at the end of the program, but  
I'm not sure this would be a popular thing to do in the runtime, and  
if it matters to a client, this can be done in client code.

Matthias
  


More information about the MacRuby-devel mailing list