3 ms·
Do they then share the reference count, or can you get in trouble by going out of scope in the wrong order?
by mark-r 7y ago
Do they then share the reference count, or can you get in trouble by going out of scope in the wrong order?
- gpderetta 7y agoThey will share the same reference count. In fact you can make two shared_ptrs to arbitrary types share the same reference count (although in this case there is no implicit conversion and you need to use the explicit aliasing constructor); it is useful for interior pointers for example.