Created
December 13, 2010 18:31
-
-
Save betamatt/739373 to your computer and use it in GitHub Desktop.
Testing Struct GC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo; 10000.times{x = Struct.new(:field).new("1")}; end | |
GC.enable_stats | |
GC.start | |
ObjectSpace.live_objects | |
=> 174939 | |
foo | |
GC.start | |
ObjectSpace.live_objects | |
=> 174947 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment