Skip to content

Instantly share code, notes, and snippets.

@js
Created September 6, 2016 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save js/519487b9fd4cfaaf992c1ceedfa96022 to your computer and use it in GitHub Desktop.
Save js/519487b9fd4cfaaf992c1ceedfa96022 to your computer and use it in GitHub Desktop.
// weak-strong dance by shadowing self
foo { [weak self] in
guard let `self` = self else { return }
self.bar()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment