From: <jc...@gm...> - 2015-01-30 13:16:53
|
Hello again, sorry for the long delay, I was called off onto another project. On 11 January 2015 at 08:44, Kouhei Sutou <ko...@co...> wrote: >> It doesn't seem to work for me. If I run: >> >> 10000.times do >> Vips::Image.new >> end >> GC.start >> >> I still have 10,000 GObjects, each with one ref. > > I got the following: > > -- > Vips::const_missing: Image > Vips::init: [] > Vips::Loader.initialize: Vips, [] > Vips::Loader.pre_load: #<GObjectIntrospection::Repository:0x0000000286eaa0>, Vips > Vips::Loader.call_init_function: #<GObjectIntrospection::Repository:0x0000000286eaa0>, Vips > Vips::Loader.post_load: > 41 > 0 Thank you for trying this. That's counting instances of the Ruby classes, which I agree are being freed. But the underlying GObjects are not being unreffed. If you put a breakpoint on vips_object_finalize(), for example, it is never called. How can I get gobject-introspection to call g_object_unref() whan an object is removed by GC? > Did you use the latest gobject-introspection gem? I used > gobject-introspection 2.2.4 gem: Yes, I'm using 2.2.4. John |