3 ms·
But these vulnerabilities can only happen if reference counting is not automatic, right?
by gmueckl 9y ago
But these vulnerabilities can only happen if reference counting is not automatic, right?
- pcwalton 9y agoNo, 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.