For iOS developers, avoiding retain cycles is one of those things that is conceptually easy but can be deceptively subtle in practice. For the uninitiated, Swift manages memory by checking how many objects reference a given variable. When all references to an object are removed, the object can be deallocated. You can however mark a variable as “weak” to say that you want to reference that object, but you don’t explicitly need it to stick around. Weak variables also have a nice property, in that when the object they refer to is deallocated, the variable automatically becomes nil. Using weak variables is a common pattern for when you simply want to inform some object that you’ve updated your state.