Use DoubleIDWeakMap for |rendererFunctions|
This commit is contained in:
parent
49ac160ff7
commit
759a46f3d6
3 changed files with 54 additions and 16 deletions
|
@ -70,10 +70,8 @@ class KeyWeakMap {
|
|||
// Remove object with |key| in the WeakMap.
|
||||
void Remove(const K& key) {
|
||||
auto iter = map_.find(key);
|
||||
if (iter == map_.end()) {
|
||||
LOG(WARNING) << "Removing unexist object with ID " << key;
|
||||
if (iter == map_.end())
|
||||
return;
|
||||
}
|
||||
|
||||
iter->second.second->ClearWeak();
|
||||
map_.erase(iter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue