Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2015 22:36
Show Gist options
  • Save anonymous/4bc683f0e9c66f962c45 to your computer and use it in GitHub Desktop.
Save anonymous/4bc683f0e9c66f962c45 to your computer and use it in GitHub Desktop.
open-uri memory leak, even with explicit garbage collect
require 'open-uri'
loop do
sleep 1
open('http://google.com') do |request|
request.read
end
GC.start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment