class Rack::GarbageCollector

Forces garbage collection after each request.

Public Class Methods

new(app) click to toggle source
# File lib/rack/contrib/garbagecollector.rb, line 4
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/contrib/garbagecollector.rb, line 8
def call(env)
  @app.call(env)
ensure
  GC.start
end