News for hackers. Stuff that matters.
Re:So We've Got a Memory Leak by cobbal on Saturday May 11, 2024 @01:39PM (#40329522)
Is this a property of JavaScript or the engine running it? This feels like something a sufficiently-smart™ closure implementation should be able to prevent.
Re:So We've Got a Memory Leak by Jasper_ on Saturday May 11, 2024 @02:04PM (#40329659)
This is an artifact of V8's GC. Effectively, largeObject and smallObject are tracked together, as a unit. Splitting it out into two separate records increases average memory usage. They keep saying they want to fix it eventually, but it's been this way for 10+ years at this point.

You really do have to know the quirks of what you're targeting.

Re:So We've Got a Memory Leak by Dylan16807 on Sunday May 12, 2024 @12:29AM (#40332287)
> sufficiently-smart™

Well, the reference lua implementation handles this case fine, and it's a solid but not at all smart™ codebase.