Skip to content

Commit

Permalink
[ruby/fiddle] Free closures immediately
Browse files Browse the repository at this point in the history
(ruby/fiddle#109)

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 e84ea4a commit dffca50
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 dffca50

Please sign in to comment.