IsOwned
IsOwned is a term used in software design to denote whether a resource or object is owned by a particular component or module. It commonly appears as a boolean flag on a resource handle, pointer wrapper, or API object. When IsOwned is true, the owner is responsible for releasing, disposing, or finalizing the resource, typically when the owner is destroyed or when the resource is explicitly released. When false, the resource may be owned by another component or managed by a separate lifecycle, and the current component must not attempt to free it to avoid double-free or use-after-free errors. Ownership can be transferred by performing a move or by explicitly updating the flag.
In practice IsOwned is used in memory and resource management, including wrappers around memory buffers, file
Common pitfalls include incorrect flag handling leading to premature deallocation or leaks, inconsistent ownership after copying