class Workarea::DeferredGarbageCollection
Constants
- DEFERRED_GC_THRESHOLD
Public Class Methods
reconsider()
click to toggle source
# File lib/workarea/testing/deferred_garbage_collection.rb, line 11 def self.reconsider if DEFERRED_GC_THRESHOLD > 0 && Time.current - @@last_gc_run >= DEFERRED_GC_THRESHOLD GC.enable GC.start GC.disable @@last_gc_run = Time.current end end
start()
click to toggle source
# File lib/workarea/testing/deferred_garbage_collection.rb, line 7 def self.start GC.disable if DEFERRED_GC_THRESHOLD > 0 end