From: Rick DeNatale Date: 2006-10-27T00:38:05+09:00 Subject: Re: debugging memory use and GC On 10/25/06, snacktime wrote: > What is a good way to find out what objects are not being GC'd ? I am > seeing a strange pattern I can't figure out. The app is handling > large files and will use up to 150mb or so of memory and then when I > call GC.start it goes back down to around 8mb. But after a few cycles > memory stops being reclaimed. Of course, what you really want to know is not just what's not getting GCed but WHY. This can be a difficult problem. You really want to find the reference paths from root objects. Some GC languages like Smalltalk have methods in object to get a list of everything which references it. I haven't seen such a facility in Ruby. Then the problem with this is that calling this method generates additional references to the objects referencing the object etc. This kind of heisenberg effect makes building a tool to find reference paths difficult. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/