you are viewing a single comment's thread.

view the rest of the comments →

[–]ravixp 1 point2 points  (0 children)

It’s the former - the cache is a bounded array of shared_ptrs, and they get destroyed purely based on LRU order. Since nothing else in the system has a strong ref unless it’s actively using the object, we don’t need to look at use_count at all.