use use_count instead of unique()

This should be safe to use, since there aren't any weak_ptr's using the shared_ptr. Furthermore any async operations should be finished or guarded for multithreaded execution.
This commit is contained in:
Mathis Logemann 2022-01-25 10:21:27 +01:00
parent 79901e494b
commit 9ac35a0a9c

View file

@ -75,7 +75,7 @@ public:
typename ContType::iterator itr=pool_.begin();
while ( itr!=pool_.end())
{
if (!itr->unique())
if (itr->use_count() > 1)
{
++itr;
}