GNOME Bugzilla – Bug 638892
Only check if we need to release a closure after function invocation if there was no GDestroyNotify argument.
Last modified: 2012-04-04 12:52:40 UTC
This makes Valgrind happy
Created attachment 177727 [details] [review] Only check if we need to release a closure after function invocation if there was no GDestroyNotify argument.
Tomeu: Was this committed or should this get in? (Trying to clean the accepted-commit_now queue a bit.)
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
This has become stale after the invoke rewrite :/
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!
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.