refcounted
Refcounted refers to a memory management technique where the lifetime of an object is determined by counting how many references exist to it. When an object is created, its reference count is typically initialized to one. Each time a new reference is made to the object, its reference count is incremented. Conversely, when a reference to the object is no longer needed, the reference count is decremented. When the reference count of an object reaches zero, it signifies that no part of the program is actively using the object, and it can therefore be safely deallocated or freed from memory.
This method is a form of automatic memory management, aiming to prevent memory leaks by ensuring that