File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export class Entry<TArgs extends any[], TValue> {
97
97
this . dirty = true ;
98
98
this . value . length = 0 ;
99
99
reportDirty ( this ) ;
100
- forgetChildren ( this ) ;
101
100
// We can go ahead and unsubscribe here, since any further dirty
102
101
// notifications we receive will be redundant, and unsubscribing may
103
102
// free up some resources, e.g. file watchers.
@@ -107,6 +106,11 @@ export class Entry<TArgs extends any[], TValue> {
107
106
public dispose ( ) {
108
107
this . setDirty ( ) ;
109
108
109
+ // Sever any dependency relationships with our own children, so those
110
+ // children don't retain this parent Entry in their child.parents sets,
111
+ // thereby preventing it from being fully garbage collected.
112
+ forgetChildren ( this ) ;
113
+
110
114
// Because this entry has been kicked out of the cache (in index.js),
111
115
// we've lost the ability to find out if/when this entry becomes dirty,
112
116
// whether that happens through a subscription, because of a direct call
You can’t perform that action at this time.
0 commit comments