From: Joel VanderWerf Date: 2007-10-02T05:22:22+09:00 Subject: Re: [ANN] dike-0.0.1 - a memory leak detector Michal Suchanek wrote: > On 28/09/2007, ara.t.howard wrote: >> On Sep 28, 2007, at 11:26 AM, Joel VanderWerf wrote: >> >>> That looks very useful. I'm not sure "leak" is the term I >>> would use, since the objects are reachable. Unused reachable >>> objects can be just as much of a problem as unreachable objects, of >>> course. >>> >> agree. we seem to be the minority though ;-( >> > > Are there any unreachable objects in Ruby? They should be collected > and go away eventually. So what I am left with is a gigabyte of > reachable objects ... time to optimize space I guess. Sure there are. Ruby's GC is conservative. If it sees a number on the stack that looks like the address of an object, it assumes that the number is a pointer (though it could be something else) and it marks the object, even though the object might not be reachable. That's expected behavior. There can also be bugs, of course. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407