I understand that all application classe files are reloaded before
processing each HTTP request when in development mode (by default,
using Ruby “load”). I assume therefore that the corresponding class
objects (controller, model) are also created at the same time, along
with dynamically created methods such as those required for
associations such as has_many. Correct so far?
What happens to these class objects and other objects created during
request processing - i.e. controller and model objects such as created
by c=Customer.new - at the completion of request processing lifecycle
(post-render)? Do they get swept up by garbage collection? Is the
behaviour the same in production mode? Does anything persist between
requests, apart from session (and flash) objects?