Controllers seem to be leaked in 1.2.6 but not in 2.0.2. I created an
empty rails app with nothing but the following controller:
class HomeController < ApplicationController
def index
@contents = []
1.upto(2000) {
@contents << “big long string.”
}
end
end
where "big long string is about 1K long. This creates a controller
with a member variable with a good 2 megs worth of stuff hanging off
it. (@contents) If I run this controller in 1.2.6, and then exercise
the app, it leaks like a sieve, but in 2.0.2 it doesn’t. I was
wondering what is hanging onto controllers at the end of a request? I
can work around the issue by setting @contents to nil or an empty
array at the end of the template but that seems like a hack and the
app is still leaking controllers.
Does anyone know what changed in 2.0.2 so that controllers can be
collected?