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

Memory management in Swift is almost broken? How so? This is a fascinating assertion, and I’d love to learn more.


- it adds locking to almost every line of code using classes - anytime you start holding complex references to classes you get cycles which will not be released - it’s extremely hard to debug. You have to capture memgraphs at runtime and track dependencies - it coexists with old systems like auto release pools so resources are still not released when all references go away

Try to implement a linked list in swift and you’ll get a sense of how absurd this is. And remember linked lists are a special case of graphs.




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

Search: