[gjs/wip/ptomato/internals: 5/6] WIP - Plug vfunc trampoline leak
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/internals: 5/6] WIP - Plug vfunc trampoline leak
- Date: Wed, 5 Oct 2016 07:27:15 +0000 (UTC)
commit 2d008bca490f12954c83e63304cd1f72f79027c9
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Oct 4 21:41:30 2016 -0700
WIP - Plug vfunc trampoline leak
gi/object.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index b789c18..70dab9e 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -2365,6 +2365,10 @@ gjs_hook_up_vfunc(JSContext *cx,
*((ffi_closure **)method_ptr) = trampoline->closure;
+ /* implementor now owns the closure */
+ trampoline->closure = NULL;
+ gjs_callback_trampoline_unref(trampoline);
+
g_base_info_unref(interface_info);
g_base_info_unref(type_info);
g_base_info_unref(field_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]