开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜