After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638892 - Only check if we need to release a closure after function invocation if there was no GDestroyNotify argument.
Only check if we need to release a closure after function invocation if there...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-07 09:09 UTC by Tomeu Vizoso
Modified: 2012-04-04 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Only check if we need to release a closure after function invocation if there was no GDestroyNotify argument. (1.58 KB, patch)
2011-01-07 09:09 UTC, Tomeu Vizoso
needs-work Details | Review

Description Tomeu Vizoso 2011-01-07 09:09:05 UTC
This makes Valgrind happy
Comment 1 Tomeu Vizoso 2011-01-07 09:09:08 UTC
Created attachment 177727 [details] [review]
Only check if we need to release a closure after function invocation if there was no GDestroyNotify argument.
Comment 2 André Klapper 2012-02-22 12:00:44 UTC
Tomeu: Was this committed or should this get in? 
(Trying to clean the accepted-commit_now queue a bit.)
Comment 3 Paolo Borelli 2012-02-22 12:07:38 UTC
Review of attachment 177727 [details] [review]:

::: gi/pygi-invoke.c
@@ -835,3 +839,3 @@
     if (state->closure != NULL) {
-        if (state->closure->scope == GI_SCOPE_TYPE_CALL)
-            _pygi_invoke_closure_free (state->closure);
+        /* the function could have released the closure already */
+        if (state->destroy_notify_index == -1)

nitpick: let's use && instead of nested if
Comment 4 Tomeu Vizoso 2012-02-22 14:23:26 UTC
This has become stale after the invoke rewrite :/
Comment 5 Martin Pitt 2012-04-04 12:36:42 UTC
Tomeu, do you still remember what you did to reproduce this? Unfortunately valgrind complains all over the place here.

The patch now does not apply at all, and it's not sure that this is even still an issue. I unmark it as a patch for now to get it off the patch review queue.

Thanks!
Comment 6 Tomeu Vizoso 2012-04-04 12:46:47 UTC
I'm not seeing any valgrind errors that may be related to this, so I think it can be closed now. I guess J5 fixed it in his invoke rewrite.