Skip to content

Commit

Permalink
Free closures immediately (#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.
  • Loading branch information
tenderlove committed Jul 14, 2022
1 parent 49ea149 commit 8a10ec1
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 8a10ec1

Please sign in to comment.