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:
parent
79901e494b
commit
9ac35a0a9c
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ public:
|
||||||
typename ContType::iterator itr=pool_.begin();
|
typename ContType::iterator itr=pool_.begin();
|
||||||
while ( itr!=pool_.end())
|
while ( itr!=pool_.end())
|
||||||
{
|
{
|
||||||
if (!itr->unique())
|
if (itr->use_count() > 1)
|
||||||
{
|
{
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue