News for hackers. Stuff that matters.
Re:Ask HN: What are some cool but obscure data structures yo... by stickupkid on Friday July 22, 2022 @05:53AM (#32190293)
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.
Re:Ask HN: What are some cool but obscure data structures yo... by withinboredom on Friday July 22, 2022 @06:15AM (#32190400)
Do Promises hold a reference to the chain of functions that end in the result? If so, that seems like a bug.
Re:Ask HN: What are some cool but obscure data structures yo... by epolanski on Friday July 22, 2022 @09:38AM (#32191750)
A promise is just an object, it does not contain any reference to the chained functions.