Refactor some potentially unsafe SharedPtr<> code.
This commit is contained in:
parent
40a9ebd078
commit
74f2b78c04
3 changed files with 9 additions and 22 deletions
|
@ -388,7 +388,7 @@ void Topology::doPeriodicTasks(void *tPtr,int64_t now)
|
|||
Path::HashKey *k = (Path::HashKey *)0;
|
||||
SharedPtr<Path> *p = (SharedPtr<Path> *)0;
|
||||
while (i.next(k,p)) {
|
||||
if (p->reclaimIfWeak())
|
||||
if (p->references() <= 1)
|
||||
_paths.erase(*k);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue