*fixed an invalid gc table iteration bug.
This commit is contained in:
parent
8e3a9ab748
commit
86e79c059d
1
HISTORY
1
HISTORY
@ -1,6 +1,7 @@
|
||||
Jan. 15 2016
|
||||
Fixed some crash bugs with invalid syntax
|
||||
Fixed some memory leak with invalid syntax
|
||||
Fixed an invalid GC table iteration bug
|
||||
|
||||
Jan. 14 2016
|
||||
Fixed a collection accessing bug in an assignment statement
|
||||
|
@ -4670,12 +4670,18 @@ void _gc_add(_ref_t* ref, void* data, _gc_t* gc) {
|
||||
|
||||
void _gc_remove(_ref_t* ref, void* data) {
|
||||
/* Remove a referenced object from GC */
|
||||
_ht_node_t* table = 0;
|
||||
mb_unrefvar(data);
|
||||
|
||||
mb_assert(ref && data);
|
||||
|
||||
if(ref->s->gc.table)
|
||||
_ht_remove(ref->s->gc.table, ref, 0);
|
||||
if(ref->s->gc.collecting)
|
||||
table = ref->s->gc.recursive_table;
|
||||
else
|
||||
table = ref->s->gc.table;
|
||||
|
||||
if(table)
|
||||
_ht_remove(table, ref, 0);
|
||||
}
|
||||
|
||||
int _gc_add_reachable(void* data, void* extra, void* ht) {
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user