From: Farrel Lifson Date: 2008-11-09T07:10:26+09:00 Subject: Memory implications for persistent Proc objects What are the memory implications for keeping a Proc/closure around especially those that are defined in a global scope? Is Ruby clever enough not to keep objects in the Proc closure that are never referenced in that closure? I'm worried where I have the following scenario big_object = BigObjectNeedsLotsOfRAM.new my_proc = Proc.new { ... } # big_object not referenced in my_proc big_object = nil my_proc.call Will the memory allocated to big_object remain in use because it was alive when my_proc was created despite it not being referenced or used in my_proc? Farrel