mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Changed the counting so that only objects that are alive are added to the object counts.
This commit is contained in:
@@ -35,11 +35,11 @@ void os_count_object_type(mrb_state *mrb, struct RBasic* obj, void *data)
|
||||
{
|
||||
struct os_count_struct* obj_count;
|
||||
obj_count = (struct os_count_struct*)(data);
|
||||
obj_count->counts[obj->tt]++;
|
||||
|
||||
if (is_dead(mrb, obj)) {
|
||||
obj_count->freed++;
|
||||
} else {
|
||||
obj_count->counts[obj->tt]++;
|
||||
obj_count->total++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user