mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Reuse named route helper module between Routing reloads to prevent memory leaks.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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]
|
||||
|
||||
* ActionView::Base.erb_variable accessor names the buffer variable used to render templates. Defaults to _erbout; use _buf for erubis. [Rick Olson]
|
||||
|
||||
* assert_select_rjs :remove. [Dylan Egan]
|
||||
|
||||
@@ -996,7 +996,11 @@ module ActionController
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user