Summary: | Add a function to close the document | ||
---|---|---|---|
Product: | poppler | Reporter: | Gian Mario Tagliaretti <gianmt> |
Component: | glib frontend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | CC: | benjamin |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patch |
Description
Gian Mario Tagliaretti
2009-05-27 14:26:50 UTC
What does pygtk do to solve this problem with GObjects? Widget are destroyed by pyggobject when the mainloop closes or when the destroy method is called, tp_dealloc is called on the python object and g_object_unref is called on the C reference. This case is different because we want to close the document even if the app is still up and running, I guess in a C app you just unref the document. As written in https://bugs.launchpad.net/poppler-python/+bug/316722/comments/7. AFAICT the problem is that the binding generators assume that they need to g_object_ref the object created by the *_new functions. When that happens, the last reference to the C object will not be released when python destroys its object. The fix is to tell the binding generator that the return value of the *_new function should not be g_object_ref'ed. Is this still needed? poppler (git master) has now GObject introspection support, can I assume that bindings generated using introspection will do the right thing? Closing this report. 1. It was a binding bug to begin with (wrong annotation) 2. Everything works fine with the introspection bindings |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.