Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
stickupkid
· 4y ago · 0 comments
It does, but the map has a reference to it, so it will "leak" (in gc languages an unwanted reference is considered a leak). If this map got rather large, you could end up with a rather large heap and it would be un-obvious why at first.
Comments
[–]
withinboredom
4y ago
Do Promises hold a reference to the chain of functions that end in the result? If so, that seems like a bug.
[–]
epolanski
4y ago
A promise is just an object, it does not contain any reference to the chained functions.