MakeSchool-Tutorials / Makestagram-Swift-V3

14 stars 7 forks source link

Explanation of [unowned self]? #52

Open scottpchow23 opened 7 years ago

scottpchow23 commented 7 years ago

Given the frequency of [unowned self] in the many closures of this project, I think it would be fair to provide some explanation about why its used in term of preventing memory leaks and such, as well as when to and when not to (at the moment, it might look arbitrary to a new student).

ocwang commented 7 years ago

Yeah, you're right. I'll get to this at some point. Going to wrap this into the closures playground / section.

ocwang commented 6 years ago

Originally didn't want to include this because then we'd need to explain memory management. A middle ground would be adding an info box that brief explains the general concept but doesn't go in-depth on memory management and how it works.