Last active
February 8, 2016 02:41
-
-
Save craiglittle/7da6739fe480aca9ed3a to your computer and use it in GitHub Desktop.
Script to demonstrate finite_machine memory leak
This file contains 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
require 'finite_machine' | |
2.times do | |
puts | |
ObjectSpace.garbage_collect | |
p ObjectSpace.count_objects | |
p ObjectSpace.count_objects.values.reduce(:+) | |
1_000.times do | |
FiniteMachine.define | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment