stack. dynamically allocated memory is done in the heap. that means, it lives between function calls. now, in ruby, all memory is allocated on the heap (even local variables): http://timetobleed.com/garbage-collection-slides-from-la-ruby-conference/
how can you tell if you have a memory leak? examine the change in memory over time, if it goes up but doesn’t come down, then you may have a memory leak
which version of ruby you're using. THIS IS IMPORTANT. You can't efficiently track down a memory leak without a tool. And you can't choose which tool unless you know which version of ruby you're using.
photo by Harry Wood: http://flickr.com/photos/harrywood/4248316700/ • cc licensed ( BY NC ) flickr photo by Fredrik Linge: http://flickr.com/photos/25172838@N05/4074004633/ • cc licensed ( BY NC ) flickr photo by daveograve@: http://flickr.com/photos/daveograve/581608282/ • cc licensed ( BY NC SD ) flickr photo by Automotivespace: http://flickr.com/photos/fam_montagna/6177485590/ • cc licensed ( BY NC SD ) flickr photo by RealEstateClientReferrals: http://flickr.com/photos/realestateclientreferrals/4049366729/ • cc licensed ( BY ) flickr photo by ilamont.com: http://flickr.com/photos/ilamont/5538511847/ • cc licensed ( BY NC ND ) flickr photo by MissBlythe: http://flickr.com/photos/missblythe/1484248550/ • cc licensed ( BY NC SD ) flickr photo by nathangibbs: http://flickr.com/photos/nathangibbs/98592171/ • cc licensed ( BY ND ) flickr photo by Caveman Chuck Coker: http://flickr.com/photos/caveman_92223/3347745000/ • Manup: With permission from creator: http://www.liambrazier.com/img/manup.jpg • cc licensed ( BY ND ) flickr photo by owlhere: http://flickr.com/photos/owlhere/5266992389/ • cc licensed ( BY NC SD ) flickr photo by ZakVTA: http://flickr.com/photos/isaachsieh/5457647194/ • cc licensed ( BY NC ) flickr photo by thisisfurious: http://flickr.com/photos/febhorne/3100226289/ 37 Wednesday, December 14, 11