banister / devil

ruby bindings for devil cross platform image loading library
http://openil.sourceforge.net
Other
60 stars 9 forks source link

Memory leak with Devil? #3

Closed mperham closed 14 years ago

mperham commented 14 years ago
require 'rubygems'
require 'devil'

def memory
  `ps -o vsz,rss -p #{$$}`.strip.split
end

p memory
10.times do
  1_000.times do
    Devil.with_image("a.jpg") do |img|
      # img.thumbnail(100)
      # img.save("a_100.png")
    end
  end
  GC.start
  p Process.times
  p memory
end

Just iterating over a with_image block causes the process's RSS to quickly grow. I'm assuming this is a memory leak.

banister commented 14 years ago

close based api implemented in most recent gem