From c83f53bce7e20f4c5082b80588762b3d7a06dac6 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Thu, 11 Dec 2008 15:49:40 +0000 Subject: [PATCH] Fix session related memory leak --- actionpack/lib/action_controller/base.rb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c2f0c1c..13f2e90 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1160,6 +1160,9 @@ module ActionController #:nodoc: 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 -- 1.6.0.1