Skip to content

Instantly share code, notes, and snippets.

@azonov
Last active March 30, 2023 17:18
Show Gist options
  • Save azonov/d57ea2eb05cede204e004fb24d4b2c5c to your computer and use it in GitHub Desktop.
Save azonov/d57ea2eb05cede204e004fb24d4b2c5c to your computer and use it in GitHub Desktop.
struct Weakify<Object: AnyObject> {
weak var object: Object?
}
func weak<Object: AnyObject>(_ object: Object) -> Weakify<Object> {
Weakify(object: object)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment