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
Andrew Stewart  
View profile
 More options Feb 16, 7:34 am
From: Andrew Stewart <b...@airbladesoftware.com>
Date: Sat, 16 Feb 2008 12:34:03 +0000
Local: Sat, Feb 16 2008 7:34 am
Subject: Re: God's memory leak - a scientific treatment

On 16 Feb 2008, at 00:53, Tom Werner wrote:

> Further testing shows that it's the condition.base_name part of the
> line that is responsible. Here's the code:

>     def base_name
>       self.class.name.split('::').last
>     end

Well done for isolating this; a triumph of empirical legwork.

> Amazingly, this seemingly benign method rings a very familiar bell.
> Another developer at Powerset had identified a piece of code in his
> app that looked very much like this and resulted in a HUGE memory leak
> as well. The odd but functional fix that we identified was to create a
> local scope by declaring a local variable. Here's the diff that I will
> try for this test run:

>      def base_name
> +      x = 1
>        self.class.name.split('::').last
>      end

Odd indeed.  This looks like a bug in Ruby.  Would Ruby Talk be the  
best place to raise this in the hope of solving the problem at source?

Regards,
Andy Stewart

-------
http://airbladesoftware.com


    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