Skip to content

Commit

Permalink
Changed the counting so that only objects that are alive are added to…
Browse files Browse the repository at this point in the history
… the object counts.
  • Loading branch information
ryan-scott-dev committed May 18, 2013
1 parent e36a027 commit 391807b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrbgems/mruby-objectspace/src/mruby_objectspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down

0 comments on commit 391807b

Please sign in to comment.