mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-06 03:18:19 +00:00
10 lines
234 B
Swift
10 lines
234 B
Swift
/// A wrapper that holds a weak reference to an object. This lets us create native containers
|
|
/// of weak references.
|
|
class Weak<T: AnyObject> {
|
|
weak var value: T?
|
|
|
|
init(_ value: T? = nil) {
|
|
self.value = value
|
|
}
|
|
}
|