Changed the counting so that only objects that are alive are added to the object counts.

This commit is contained in:
Ryan Scott
2013-05-18 10:46:55 +10:00
parent e36a0275e1
commit 391807b73c
@@ -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++;
}
}