Weak timers

Chapter 6, page 123 has a potential memory leak in it. In this particular program, it’s not possible for this to really leak, but in general it’s worth understanding the correct way to approach it. In the example code, the view retains an infinitely-repeating NSTimer, for which the view is the target. This is a retain loop, since NSTimer retains its target. There are various ways to...

Read More