Google Groups Home
Help | Sign in
Message from discussion God's memory leak - a scientific treatment
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bob Hutchison  
View profile
 More options Feb 16, 11:40 am
From: Bob Hutchison <hutch-li...@recursive.ca>
Date: Sat, 16 Feb 2008 11:40:04 -0500
Local: Sat, Feb 16 2008 11:40 am
Subject: Re: God's memory leak - a scientific treatment
Hi,

On 15-Feb-08, at 7:53 PM, Tom Werner wrote:

> All I can say is SCIENCE!

> I can't tell you how glad I am to have finally solved this problem.
> The fun isn't over yet, though. I'll now confirm the fix for 10
> watches and on 1.8.6. Stay tuned!

Well done!

Here's a test case that demonstrates what is surely a bug. If you  
want, you can post on ruby-talk or someplace more efficient to get  
some attention and a fix. Make sure you post the test case.

module Play
  class Toy
    def peek_at_proc
      puts `ps u -p #{Process.pid}`
    end

    def base_name
      #x = 1 # <<<<<< REMOVE COMMENT TO FIX MEM LEAK
      "a,b".split(',')
    end

    def test
      peek_at_proc

      1000000.times do
        base_name
      end

      peek_at_proc
    end
  end
end

Play::Toy.new.test


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google