Skip to content

Commit

Permalink
Fixed session related memory leak [#1558 state:resolved]
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information
fcheung authored and josh committed Dec 15, 2008
1 parent 8da5c55 commit bf0a8eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actionpack/lib/action_controller/base.rb
Expand Up @@ -1164,6 +1164,9 @@ def expires_now #:doc:
def reset_session #:doc:
request.reset_session
@_session = request.session
#http://rails.lighthouseapp.com/projects/8994/tickets/1558-memory-problem-on-reset_session-in-around_filter#ticket-1558-1
#MRI appears to have a GC related memory leak to do with the finalizer that is defined on CGI::Session
ObjectSpace.undefine_finalizer(@_session)
response.session = @_session
end

Expand Down

0 comments on commit bf0a8eb

Please sign in to comment.