If I understand the documentation correctly, the e.g. C++ pointers are very 
different. A `unique_ptr` cant be aliased at all. A `shared_ptr` can have 
multiple aliases and stores the number of aliases. A `weak_ptr` doesn't affect 
the reference counting. With Araq's proposal, an `owned ref` can be aliased and 
always and this affects the reference count. When the `owned ref` goes out of 
scope, it is time for a deallocation, but the refcount needs to be checked 
first. If greater zero, then dangling pointers remain. Deletion/Deallocation of 
the object will then be postponed. ( It could be placed in a separate list...). 
The program doesn't need to quit. However, the remaining aliases become 
obsolete then. But they will not harm memory integrity. If the GC is switched 
off, no stack scan is needed anymore. 

Reply via email to