2 ms·
No, because of the way references in C++ work—you can take a reference to the inside of a reference counted object without manipulating the reference count. Th
by pcwalton 9y ago
No, because of the way references in C++ work—you can take a reference to the inside of a reference counted object without manipulating the reference count.
They could also happen if you used non-thread-safe reference counting on a thread-safe object. Now this seems to be rare in practice, because non-thread-safe reference counting is unusual. If it became more prevalent, however, I could see it happening.