Documentation
Overview ¶
Package weak provides weak references for Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ref ¶
type Ref struct {
// contains filtered or unexported fields
}
Ref is a weak reference.
Create one with NewRef and retrieve referenced object with Get.
There must be no more than 1 weak reference to any object. Weak references must not be attached to an object on which runtime.SetFinalizer is also used. Weak references must not be copied.