Mega Code Archive

 
Categories / Ruby / Development
 

Disabling the Garbage Collector

h = {} GC.disable if ARGV[0] 5e5.to_i.times {|i| h[i] = "dummy"} h = nil GC.enable GC.start