News for hackers. Stuff that matters.
Re:Swift is a more convenient Rust by mind-blight on Friday September 06, 2024 @08:20AM (#41465494)
Most variables on JavaScript are (essentially) pointers. A common mistake people make in the language is keeping references to objects in a global map, which prevents them from being garbage collected (often a bad caching implementation).

You can use things like WeakMap or WeakRef as one solution, but there are usually better options

There are no comments on this comment yet.