Class Weak<T>
└
Object
Holds a weak reference to an object. A weak reference allows access to an object, but does not
participate in reference counting. Objects are destroyed when there are no remaining normal
("strong") references to them, even if one or more Weak
references remain in memory.
- Source Code:
- View Source
Initializer Summary
Inherited Fields:
Instance Method Summary
Initializers
Instance Methods
method get
():T
Returns the object referenced by this Weak
. It is a safety violation to refer to an object
after it has been destroyed (by having no remaining strong references to it); this will be
detected using default compiler settings, but result in undefined behavior when safety checks
are disabled.