I''ve found surprisingly little information on what really causes memory leaks within Rails. (yes, I know what causes memory leaks *in general* -- things getting elevated to global scope and not getting freed, etc) What is lost on me is some of the details. For example, someone out there discovered that some of his routes were "ugly" and that caused leaks. I haven''t a clue what an "ugly" route is or why it causes a memory leak, but I have a more direct question. Similarly, someone discovered that doing ActiveRecord finds within the view are a memory leak, too. Is there something about the view scope that puts it at global scope? I thought it was in the same scope as the action of the corresponding controller. Specifically, is there any difference between the two methodologies: 1) Let the view get the data from ActiveRecord methods controller: def show @person = Person.find(:first) end view: <%= @person.name %> has <%= @person.friends.count %> friends. ... proceed to list friends ... 2) Get ALL data in the controller: controller: def show @person = Person.find(:first) @friends = @person.friends end view: <%= @person.name %> has <%= @friends.size %> friends. ... proceed to list friends ... Cheers, Jake -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---