mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (before_gc_sweep, run_final): fix decrement timing of final_num.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc9176ac0e
commit
87c0b99446
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Oct 28 23:31:39 2010 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (before_gc_sweep, run_final): fix decrement timing of final_num.
|
||||
|
||||
Thu Oct 28 20:11:30 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* tool/enc-unicode.rb,
|
||||
|
|
3
gc.c
3
gc.c
|
@ -2026,7 +2026,6 @@ before_gc_sweep(rb_objspace_t *objspace)
|
|||
}
|
||||
objspace->heap.sweep_slots = heaps;
|
||||
objspace->heap.free_num = 0;
|
||||
objspace->heap.final_num = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2871,6 +2870,8 @@ run_final(rb_objspace_t *objspace, VALUE obj)
|
|||
RUBY_DATA_FUNC free_func = 0;
|
||||
st_data_t key, table;
|
||||
|
||||
objspace->heap.final_num--;
|
||||
|
||||
objid = rb_obj_id(obj); /* make obj into id */
|
||||
RBASIC(obj)->klass = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue