On Tuesday, 17 October 2017 at 10:05:23 UTC, Atila Neves wrote:
It's when you have a shared_ptr to an object that has a shared_ptr to an object that has a ... (or unique_ptrs along the way).

Well, yes I've seen some online lectures/tutorials that use it for managing graphs and linked lists, but this is overkill in most cases. shared_ptr seems most suited for sharing resources over threads.

Although I guess you can get that effect if you use it for tracking cached objects in a database client or something like that.

Sounds more like a problem for people developing frameworks than for applications. Frameworks have to make the difficult trade off of whether they should roll their own or use a standard mechanism. End users often would prefer a standard solution I guess.





Reply via email to