Skip to content

Commit

Permalink
fix for #241
Browse files Browse the repository at this point in the history
This should fix the dangling pointer issue caused by `GC.compact` moving the monitor object's memory address to a new location.
  • Loading branch information
boazsegev authored and ioquatix committed Sep 5, 2020
1 parent 8aa37f3 commit 507c199
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/nio4r/monitor.c
Expand Up @@ -66,6 +66,7 @@ static VALUE NIO_Monitor_allocate(VALUE klass)

static void NIO_Monitor_mark(struct NIO_Monitor *monitor)
{
return rb_gc_mark(monitor->self);
}

static void NIO_Monitor_free(struct NIO_Monitor *monitor)
Expand Down

0 comments on commit 507c199

Please sign in to comment.