-
-
Notifications
You must be signed in to change notification settings - Fork 9
Ownership
IsaacShelton edited this page Nov 13, 2022
·
9 revisions
Type | Size | Memory Management Model | File |
---|---|---|---|
Ownership |
8 bytes | None | 2.7/Ownership.adept |
enum Ownership (REFERENCE, OWN, GIVEN, DONOR)
The purpose of Ownership
is to model the ownership state in which an ownership-based value in is.
-
REFERENCE
- This value weakly references data that another value is responsible for -
OWN
- This value has the responsibility of managing it's internal data -
GIVEN
- This value has the responsibility of managing it's internal data, but it's wants to transfer ownership away -
DONOR
- This value used to have the responsibility of managing it's internal data, but has been invalidated since it no longer needs access to the data, because the responsibility has been donated away