3 ms·
An advantage of RC is that you can also use it to verify ownership. When the counter is 1, you can do anything with the object without affecting any other refe
by benibela 4y ago
An advantage of RC is that you can also use it to verify ownership.
When the counter is 1, you can do anything with the object without affecting any other references.
Like the object could be mutable for a counter=1, and copy-on-write otherwise. Then you can make a (lazy) deep copy by just increasing the counter.