Skip to content
Browse files

Fixed session related memory leak [#1558 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
1 parent 5b29008 commit d0a3dbf5aa3d9105364556c9ec5847ab3ecacaf8 @fcheung fcheung committed with josh Dec 11, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_controller/base.rb
View
3 actionpack/lib/action_controller/base.rb
@@ -1101,6 +1101,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

0 comments on commit d0a3dbf

Please sign in to comment.
Something went wrong with that request. Please try again.