{"action":"closed","issue":{"url":"https://api.github.com/repos/taf2/curb/issues/240","labels_url":"https://api.github.com/repos/taf2/curb/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/taf2/curb/issues/240/comments","events_url":"https://api.github.com/repos/taf2/curb/issues/240/events","html_url":"https://github.com/taf2/curb/issues/240","id":63179864,"number":240,"title":"There's a memory leak problem in Curl::Easy.download","user":{"login":"liudangyi","id":1825485,"avatar_url":"https://avatars.githubusercontent.com/u/1825485?v=3","gravatar_id":"","url":"https://api.github.com/users/liudangyi","html_url":"https://github.com/liudangyi","followers_url":"https://api.github.com/users/liudangyi/followers","following_url":"https://api.github.com/users/liudangyi/following{/other_user}","gists_url":"https://api.github.com/users/liudangyi/gists{/gist_id}","starred_url":"https://api.github.com/users/liudangyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liudangyi/subscriptions","organizations_url":"https://api.github.com/users/liudangyi/orgs","repos_url":"https://api.github.com/users/liudangyi/repos","events_url":"https://api.github.com/users/liudangyi/events{/privacy}","received_events_url":"https://api.github.com/users/liudangyi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-20T07:08:18Z","updated_at":"2015-12-17T20:40:55Z","closed_at":"2015-12-17T20:40:55Z","body":"I use the following code.\r\n\r\n```\r\nphotos.each do |photo|\r\n  filename = \"../thumbs/#{photo[:id]}.jpeg\"\r\n  Curl::Easy.download(photo[:thumb_url], filename) unless File.exist? filename\r\nend\r\n```\r\n\r\nAnd it quickly (about 50M/s) eats up my memory. "}}