From 2e6e2fd9da18b74aa9555d09a871b24895e42773 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Mon, 13 Dec 2021 02:15:05 +0900 Subject: fix local TP memory leak It free `rb_hook_list_t` itself if needed. To recognize the need, this patch introduced `rb_hook_list_t::is_local` flag. This patch is succession of https://github.com/ruby/ruby/pull/4652 --- vm_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 78d06012a1..6bbce23078 100644 --- a/vm_core.h +++ b/vm_core.h @@ -609,8 +609,9 @@ void rb_objspace_call_finalizer(struct rb_objspace *); typedef struct rb_hook_list_struct { struct rb_event_hook_struct *hooks; rb_event_flag_t events; - unsigned int need_clean; unsigned int running; + bool need_clean; + bool is_local; } rb_hook_list_t; -- cgit v1.2.3