mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03: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
|
|
}
|
|
}
|