1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
Aaron Patterson 2022-07-14 10:00:15 -07:00 committed by Nobuyoshi Nakada
parent e84ea4af69
commit dffca50bb6
Notes: git 2022-10-18 08:22:05 +00:00

View file

@ -56,6 +56,8 @@ closure_memsize(const void * ptr)
const rb_data_type_t closure_data_type = { const rb_data_type_t closure_data_type = {
"fiddle/closure", "fiddle/closure",
{0, dealloc, closure_memsize,}, {0, dealloc, closure_memsize,},
0, 0,
RUBY_TYPED_FREE_IMMEDIATELY,
}; };
struct callback_args { struct callback_args {