# Help tracking memory leaks

**URL:** <https://www.ruby-forum.com/t/help-tracking-memory-leaks/149619>\
**Category:** Ruby\
**Created:** [September 26, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/help-tracking-memory-leaks/149619 "2008-09-26T20:05:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ittayd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/54ee81/32.png) [@ittayd](https://www.ruby-forum.com/u/ittayd)\
**Post date:** [September 26, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/help-tracking-memory-leaks/149619/1 "2008-09-26T20:05:45Z")

</div>

Hi,

I have a ruby script that uses a lot of memory, dumping ObjectSpace  
shows that indeed a lot of object exist that shouldn’t. However, I can’t  
tell why. I don’t know the root object that causes the chain of  
references that marks them as used. What tool can help here? (I think  
ruby-prof and bleakhouse are no good since they only show objects that  
are not garbage collected, not why they are not collected)

Thank you,  
Ittay

---

<div class="post-metadata">

**Author:** ![ittayd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/54ee81/32.png) [@ittayd](https://www.ruby-forum.com/u/ittayd)\
**Post date:** [October 8, 2008, 2:29am UTC](https://www.ruby-forum.com/t/help-tracking-memory-leaks/149619/2 "2008-10-08T02:29:17Z")

</div>

> I have a ruby script that uses a lot of memory, dumping ObjectSpace  
> shows that indeed a lot of object exist that shouldn’t. However, I can’t  
> tell why. I don’t know the root object that causes the chain of  
> references that marks them as used. What tool can help here? (I think  
> ruby-prof and bleakhouse are no good since they only show objects that  
> are not garbage collected, not why they are not collected)

Saw this recently:  
[http://www.ruby-forum.com/topic/167320#new](http://www.ruby-forum.com/topic/167320#new)  
“GC.reachability\_paths”

old but about the only thing out there for MRI. You could also try  
running your code on JRuby and see if it works [different GC]  
-=R
