This project is archived and is in readonly mode.

#1558 ✓committed
tmtysk

Memory problem on reset_session in around_filter

Reported by tmtysk | December 11th, 2008 @ 09:08 AM

On rails-2.x. Memory usage would be increased and not be deallocated that on 'reset_session' in 'around_filter'.

For example, requesting so much to http://localhost:3000/foo/ using following controller on 'production' environment. Then, after all response, instances of CGI::Session or CgiRequest are deallocated from ObjectSpace, but, lots of instances of String (include session_id) will not be targeted by GC. However, using before/after filter, this problem is not occured.


class FooController < ApplicationController

  around_filter :bar

  def index
  end

  protected

  def bar
    reset_session
    yield
  end
end

thanks.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages