News for hackers. Stuff that matters.
Re:A proposal to add signals to JavaScript by falcor84 on Sunday March 31, 2024 @04:15PM (#39887639)
Are you implying that there are memory leaks in browsers' internal implementation of events? Because my take is that the problem is with "user space" scripts not cleaning up after themselves, and I don't see how that would get better by adding yet another API to be mindful of.
Re:A proposal to add signals to JavaScript by gibbitz on Sunday March 31, 2024 @05:59PM (#39888446)
I believe this would be more related to something like memoizing a DOM structure in a "Live" listener that is later removed from the DOM but not garbage collected due to the reference in the event listener. As the poster mentioned, developer error -- not a fundamental language or browser implementation flaw.
Re:A proposal to add signals to JavaScript by naasking on Tuesday April 02, 2024 @12:24AM (#39902371)
If a language or browser implementation can't reclaim this unused memory thus creating a memory leak, that arguably is a flaw. It's literally a DoS attack vector that can be exploited by the untrusted scripts that run in the browser sandbox.