views:

12

answers:

0

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 about 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.