Closed ysmood closed 4 years ago
Have you posted about this on the es-discuss@mozilla.org mailing list?
No, but I think it's a common issue of Promise libs 2016年11月18日(金) 23:43 Jake Champion notifications@github.com:
Have you posted about this on the es-discuss@mozilla.org mailing list?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ysmood/yaku/issues/37#issuecomment-261563273, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWZQEH1Ix6XrvrXHkvIGpvAcPMB19Q0ks5q_ce0gaJpZM4KPM3R .
If we call a promise's
then
method multiple times, it may potentially cause memory leak:If we don't release variable
p
, its children promises will stay in memory even afterp
and all the children are settled. What we should do with this situation is not specified in the ES6 yet.I think we should cut off the link between the parent and child immediately after the child is settled.