-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unclear how to deal with custom finalizers #11
Comments
Yeah. I don't find any reference to So maybe this is a gobject introspection deficiency? Or maybe not. Looking at the implementation of I guess we should introduce something along the lines of what I did to correctly But I'm not sure if this is the right approach. |
The function is just a C helper:
See ownership transfer: https://developer.gnome.org/gi/unstable/gi-GIArgInfo.html#GITransfer In this case, if it is GI_TRANSFER_EVERYTHING, we should manually free each item in the list and then free the list, like poppler_page_free_text_attributes does. Thanks for your work btw, I'll try to look into it tomorrow. |
It is |
Tidying up my personal issues list, so closing this. Please create a new issue if you're still interested in tracking it. |
I've found another case where the code generator doesn't look like it can do the right thing. In this case it's a
List
ofTextAttributes
which you have to free withpoppler-page-free-text-attributes
.Unfortunately when the
pgi
-generated code callst5.free()
this misses all of the contents of the list which also need freeing.Even more unfortunately, I can't see anywhere this is described in the gobject introspection bindings.
Any thoughts on how to solve this? I can't think of any way other than to implement an override for it which calls the correct free function.
The text was updated successfully, but these errors were encountered: