Skip to content

Instantly share code, notes, and snippets.

@ha1f
Created September 7, 2021 09:16
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 ha1f/c4ee1b54c5d4c481ee47ce316415b01f to your computer and use it in GitHub Desktop.
Save ha1f/c4ee1b54c5d4c481ee47ce316415b01f to your computer and use it in GitHub Desktop.
import Foundation
final class WeakObject<T: AnyObject> {
weak var _object: T?
init(_ object: T) {
_object = object
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment