Skip to content
Browse files

Apply [5548] to RC

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b7f094e commit bef626e2b14ac48d6a4093aa91907cdf5821b6eb @seckar seckar committed Nov 17, 2006
Showing with 7 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +5 −1 actionpack/lib/action_controller/routing.rb
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Reuse named route helper module between Routing reloads. Use remove_method to delete named route methods after each load. Since the module is never collected, this fixes a significant memory leak. [Nicholas Seckar]
+
* Deprecate standalone components. [Jeremy Kemper]
* Always clear model associations from session. #4795 [sd@notso.net, andylien@gmail.com]
View
6 actionpack/lib/action_controller/routing.rb
@@ -996,7 +996,11 @@ def initialize
def clear!
@routes = {}
@helpers = []
- @module = Module.new
+
+ @module ||= Module.new
+ @module.instance_methods.each do |selector|
+ @module.send :remove_method, selector
+ end
end
def add(name, route)

0 comments on commit bef626e

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