Skip to content

Commit

Permalink
[ruby/fiddle] Free closures immediately (ruby/fiddle#109)
Browse files Browse the repository at this point in the history
These structs don't need to be freed as part of finalization, so lets
free them immediately.

ruby/fiddle@8a10ec1152
  • Loading branch information
tenderlove authored and nobu committed Oct 18, 2022
1 parent 5c9efc9 commit 3ece325
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/fiddle/closure.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3ece325

Please sign in to comment.