

Visualizing memory leaks in Ruby - cirwin
http://cirw.in/blog/find-references

======
VeejayRampay
Great project. I hope the community can make good use of this to make sure the
different libraries and gems and pieces of code leak as much memory as
possible.

Thank you for putting the work in and making Ruby better.

~~~
blacksmith_tb
Did you mean "leak as little memory as possible"? Though, some days it seems
like the opposite, I admit...

~~~
hobs
No, he did not, this is what is commonly referred to as a joke.

------
throwaway54-762
A better title might be "visualizing the object-reference graph in Ruby;"
debugging memory leaks is a neat side effect. That being said, it's an
interesting little project.

------
gngeal
An unfortunate header, innit? One wonders whether to parse it as "(Visualizing
memory leaks) in Ruby" or as "Visualizing (memory leaks in Ruby)".

~~~
jfarmer
In this case both are true, no? :)

------
markov_twain
I randomly stumbled across this gist by tenderlove
<https://gist.github.com/tenderlove/4576780> that displays references as a
tree view using d3.js. I think that this gist in particular is pointing out a
bug in that the "references" for Fixnums (also Symbols) in an array aren't
returned by ObjectSpace.find_references.

------
petercooper
Ruby 2.0 has a similar feature built in, although round the other way:
ObjectSpace.reachable_objects_from(obj) .. coupled with
ObjectSpace.memsize_of() this can be used to do some memory leak analysis.

We also get GC.stat[:total_allocated_object] and GC.stat[:total_freed_object]

------
ptolts
Interesting project. Ruby memory leaks really are brutal!

