[MacRuby-devel] 0.6 and Garbage Collection (or lack of same)

Jimmy Selgen Nielsen jsn at devlix.dk
Wed Jan 27 05:09:57 PST 2010

Is there something fishy with the garbage collection in 0.6 ?
I'm using 2010/01/26, and the garbage just seems to pile up.

Running the following code will make memory usage go straight through the
roof, until SIGSEGV is received.

    def get_digest(file)
      digest = Digest::MD5.new()
      fil = File.open(file,'r')
        l = fil.read(READ_BUFFER_SIZE)
        break if l.nil?
        digest << l

I've tried various "tricks", such as setting l=nil, l="", etc, but it just
seems to pile up just the same.
I'm running it on a bunch of 0.5-2gb files, and it rarely gets more than
3-4 of them done before crashing.

ruby 1.8.7 performs this task as expected.

I'm not reporting this as a bug until i'm sure it's not "working as intended"

More information about the MacRuby-devel mailing list