From: <jc...@gm...> - 2015-01-30 14:07:55
|
Ooop, excuse me, I think I found my problem. gobject-introspection seems to be reffing the object it gets back from vips_image_new(), even though constructors should not do this (I think). How can I stop gobject-introspection from making this extra reference? If I run this code: x = Vips::Image.new x.print_dump at the end of the C vips_image_new() function, the object has a reference count of 1. But when x.print_dump runs, I see a count of 2. When I then run: x = nil GC.start the count drops to 1, but never to zero, so the object is not freed. I tried adding a (transfer full) annotation to vips_image_new(), but it made no difference, gobject-introspection still made an extra g_object_ref() during new. John |