Hacker News new | comments | ask | show | jobs | submit login

What means "swift is memory safe"? does it use a GC?



No, it uses "automatic reference counting"—it keeps a reference count of memory usage and frees it when it's no longer being referenced. And (for the most part) it automatically inserts the reference counting into your code during compilation. There are still some hints that you need to give it (like telling it about weak references to avoid reference loops, etc.)




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

Search: