File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2283,6 +2283,8 @@ function flushPassiveEffectsImpl() {
2283
2283
for ( let i = 0 ; i < unmountEffects . length ; i += 2 ) {
2284
2284
const effect = ( ( unmountEffects [ i ] : any ) : HookEffect ) ;
2285
2285
const fiber = ( ( unmountEffects [ i + 1 ] : any ) : Fiber ) ;
2286
+ // Remove nextEffect pointer to assist GC
2287
+ fiber . nextEffect = null ;
2286
2288
const destroy = effect . destroy ;
2287
2289
effect . destroy = undefined ;
2288
2290
if ( typeof destroy === 'function' ) {
@@ -2334,6 +2336,8 @@ function flushPassiveEffectsImpl() {
2334
2336
for ( let i = 0 ; i < mountEffects . length ; i += 2 ) {
2335
2337
const effect = ( ( mountEffects [ i ] : any ) : HookEffect ) ;
2336
2338
const fiber = ( ( mountEffects [ i + 1 ] : any ) : Fiber ) ;
2339
+ // Remove nextEffect pointer to assist GC
2340
+ fiber . nextEffect = null ;
2337
2341
if ( __DEV__ ) {
2338
2342
setCurrentDebugFiberInDEV ( fiber ) ;
2339
2343
if (
You can’t perform that action at this time.
0 commit comments