From: Kirk Haines Date: 2005-03-23T11:19:49+09:00 Subject: Re: memory leak Bill Kelly wrote: > This might be kind of whacky, but maybe: > > set_trace_func proc {|event, file, line, id, binding, classname| > printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname > print `ps -u #$$` > } For hard to find leaks, that's helpful. Also (and it'd slow the !#$%@!!! out of your program if you do it a lot): count = 0; ObjectSpace.each_object {count += 1} Gives you a count of the current number of objects. If you do this in key places (probably don't want to do it out of set_trace_func), it might help. Kirk Haines