In modern Javascript, if I build up a sequence of actions inside promise.then(...).catch(...)
, but I don't care about the result, nor do I need to wait for the sequence to finish, but I do want it to finish, do I need to keep a reference to the resulting Promise? Is there a danger that it might be garbage-collected and never run to completion if I don't keep a reference to it alive?
If the answer is "this is implementation-dependent," that's disappointing. But I'd be especially interested to know how recent versions of V8 (≥ 9.5) handle this.