The way std::shared_ptr has a use_count function which returns the number of shared_ptr objects referring to the same managed object; in the same way how can we get the reference count for a QSharedPointer. I did not find any API for this.. How can this be achieved?
Asked
Active
Viewed 1,089 times
3
-
As there is no method for it, you simply can't. I suggest you take a step back and ask yourself what you need this feature for, then try to solve the issue in some other (perhaps better) way. I'm sure you can get help here if you [describe the problem instead of your perceived solution](http://xyproblem.info). – Murphy Feb 12 '17 at 12:28