class Rack::GarbageCollector
Forces garbage collection after each request.
Public Class Methods
new(app)
click to toggle source
# File lib/rack/contrib/garbagecollector.rb 6 def initialize(app) 7 @app = app 8 end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/contrib/garbagecollector.rb 10 def call(env) 11 @app.call(env) 12 ensure 13 GC.start 14 end