All posts filed under “personal

Preventing memory leaks with unowned, weak and capture lists

In many programming languages, memory management is handled with what’s called a garbage collector. With iOS, the rules are a bit different. Apple implements a slightly different method for managing memory in its native app ecosystem called reference counting. Even Swift manages its memory with reference counting since Apple’s libraries are written in Objective-C, forcing Swift to interface with the Objective-C language.