From dffca50bb609661f04660221834c48f36b4b21fa Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 14 Jul 2022 10:00:15 -0700 Subject: [PATCH] [ruby/fiddle] Free closures immediately (https://github.com/ruby/fiddle/pull/109) These structs don't need to be freed as part of finalization, so lets free them immediately. https://github.com/ruby/fiddle/commit/8a10ec1152 --- ext/fiddle/closure.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index 83fa752b6d..892f522a62 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c @@ -56,6 +56,8 @@ closure_memsize(const void * ptr) const rb_data_type_t closure_data_type = { "fiddle/closure", {0, dealloc, closure_memsize,}, + 0, 0, + RUBY_TYPED_FREE_IMMEDIATELY, }; struct callback_args {