4 ms·
>so you better spend a lot of thought on memory management. The more probable outcome is stuff gets shipped with memory leaks since it isn't your server's memo
by RobotToaster 4y ago
>so you better spend a lot of thought on memory management.
The more probable outcome is stuff gets shipped with memory leaks since it isn't your server's memory it's eating.
- flohofwoe 4y agoA GC doesn't prevent memory leaks though (if you keep holding references to objects that are not actually needed anymore).
- kaba0 4y agoA GC does prevent leaking any unreachable objects, which is as good as it gets. Sure, if you store strong references to everything, nothing can be done, but that’s a trivially debuggable problem.
- flohofwoe 4y ago...which is also the most likely reason for a memory leak when you manage your memory through refcounting (or rather: with refcounting, memory leaks are just as unlikely as with a GC). But even without both, these days (with memory debuggers and profilers integrated into IDEs) pretty much all memory related problems are 'trivially debuggable', this stuff isn't as scary anymore as it was 20 years ago (e.g. Xcode's Instruments has a leak detector which lets you click on the line of code which caused a memory leak, and Visual Studio has similar features).
- kaba0 4y agoMemory leaks have never been scary in tracing GCs and they are not too scary in RC as well, though I would guess that cyclic references leaking is definitely a top 10 bug for swift and alia. Memory corruption has been/is the real issue.