Skip to content

Instantly share code, notes, and snippets.

@hanshasselberg
Last active December 11, 2015 03:58
Show Gist options
  • Save hanshasselberg/4541852 to your computer and use it in GitHub Desktop.
Save hanshasselberg/4541852 to your computer and use it in GitHub Desktop.
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
$ irb --version
irb 0.9.6(09/06/30)
$ irb
> a = "gc me"
=> "gc me"
> ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
=> [0, #<Proc:0x007f9e2abb9200@(irb):3>]
> a = nil
> GC.start
=> nil
> ObjectSpace.garbage_collect
=> nil
> exit
Finalizer one on 70158648666720
@hanshasselberg
Copy link
Author

@coffeejunk Thanks! I'm going to upgrade then!

@hanshasselberg
Copy link
Author

@coffeejunk It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment