Ownership semantics are a set of rules that govern the lifetime of allocated resources. Ownership semantics determine when and how allocated resources can be freed, and whether ownership can be shared.