-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object property reference leak #82
Comments
GirFFI is not really intended to be used in this way: The set up of finalizers probably isn't triggered if you intantiate the object from C. |
Incidentally, can you get this to work with Ruby-GNOME2? |
ruby-gnome2 doesn't support interfaces at this time. My focus went to GirFFI after I found that (although I was able to bring interface support with a quick hack). Regarding the leak: I don't think it's related finalization at all. I can see that in value.rb, Regarding the setup of finalizers (this issue is orthogonal)
PS: For I'm struggling wih #63 which is a show-stopper for my project (libpeas support for ruby) |
|
However, I don't think any of the Ruby implementation of |
It is, I tracked it. set_instance_enhanced is called for the object property. gobjects aren't ref'd by default when it is assigned to a property. Maybe here's some confusion? |
Ah yes, The only solution I can see is for me to extend the finalizer for |
By the way, do you have an example of what currently doesn't work in ruby-gnome2? |
ruby-gnome2 doesn't setup vfuncs when implementing an interface. in fact it doesn't handle |
I'm trying to create an instance of a GObject-derived type (defined in Ruby) in C code. If that type has a property of type GObject (i..e reference counted) the reference seems to leak after freeing the type. To be clear, references to the property object are leaking, not the reference to the object that has the property.
Here's a small program that reproduces the problem:
https://gist.github.com/kugel-/0b051d9a22516ea53b48d33009d11175
The text was updated successfully, but these errors were encountered: