Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

L2 Clock 5: Place NSTimer invalidation into different life cycle method #21

Open
ybakos opened this issue Sep 16, 2015 · 0 comments
Open

Comments

@ybakos
Copy link
Member

ybakos commented Sep 16, 2015

You can't invalidate the NSTimer in deinit, as deinit is never called since the NSTimer has a strong reference to the target, the controller.

Invalidate the timer in something else, like viewDidDisappear.

(Thanks Chris Hubert!)

See SwiftEducation/Clock#4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant