Skip to content

Commit d10813d

Browse files
committed
php#56: Fix memory leak for new GC
1 parent ec66e78 commit d10813d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Zend/zend_gc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,8 @@ static zend_coroutine_t* gc_spawn_destructors_coroutine(void)
20922092

20932093
coroutine->internal_entry = gc_destructors_coroutine;
20942094
coroutine->event.info = gc_destructors_info;
2095+
coroutine->extended_data = NULL;
2096+
coroutine->extended_dispose = gc_destructors_coroutine_dispose;
20952097
GC_G(dtor_coroutine) = coroutine;
20962098

20972099
return coroutine;
@@ -2402,6 +2404,7 @@ ZEND_API int zend_gc_collect_cycles(void)
24022404

24032405
GC_G(collector_time) += zend_hrtime() - start_time;
24042406
GC_G(gc_coroutine) = NULL;
2407+
GC_G(gc_scope) = NULL;
24052408
return total_count;
24062409
}
24072410

0 commit comments

Comments
 (0)