Fixed memory leak of Ruby arena objects. (#8465)
In our free() method, we were freeing the memory from the upb arena but we were failing to free the memory for the Ruby arena object. This was causing every Ruby arena object to leak: even though the objects were getting GC'd, the underlying memory was not getting released. Co-authored-by: Joshua Haberman <jhaberman@gmail.com>
This commit is contained in:
parent
7689f00ba8
commit
e8b78f8208
@ -180,6 +180,7 @@ static void Arena_mark(void *data) {
|
||||
static void Arena_free(void *data) {
|
||||
Arena *arena = data;
|
||||
upb_arena_free(arena->arena);
|
||||
xfree(arena);
|
||||
}
|
||||
|
||||
static VALUE cArena;
|
||||
|
Loading…
Reference in New Issue
Block a user