ruby memory leak Gdk::PixbufLoader
So I'm beginning to wonder how leaky the gnome2 libraries for ruby1.8.6 are.
#!/usr/bin/env ruby
require 'gtk2'
while true
sleep 0.1
pixbuf = Gdk::PixbufLoader.new
pixbuf = nil
end
this leaks 开发者_如何学Pythonabout 16kb/sec according to watch -n 1 ps -o rss -p <process id>
This is compounded if you start trying to write a chunk of large chunks of image data to it using pixbuf.last_write img_data
Any ideas how to get around this (and the second issue)? I need to update image data within my code but it seems like anything that ends up using a pixbuf leaks like a sieve.
精彩评论