Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Small hint, JavaScript is in the process of getting a dispose like API, already at stage 3.

https://github.com/tc39/proposal-explicit-resource-managemen...



Good read about this if you are using Typescript and want to start using it now (pun inteded): https://www.totaltypescript.com/typescript-5-2-new-keyword-u...


Note that the new disposable protocol in JavaScript is unrelated to garbage collection; it's more like Go's `defer`. The grandparent is talking about JavaScript's somewhat older FinalizationRegistry.


Sure, just like in many other languages with automatic memory management.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: