| 84 | } |
| 85 | |
| 86 | void ScopedAllocatorContainer::Drop(int32 scope_id, ScopedAllocator* sa) { |
| 87 | VLOG(2) << "Drop " << scope_id << " from container " << this << " step " |
| 88 | << step_id_ << " on " << mgr_->device_name(); |
| 89 | mutex_lock l(mu_); |
| 90 | auto it = allocators_.find(scope_id); |
| 91 | if (it != allocators_.end()) { |
| 92 | if (it->second.field_index != ScopedAllocator::kBackingIndex) { |
| 93 | it->second.instance->DropFromTable(); |
| 94 | } |
| 95 | allocators_.erase(it); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | ScopedAllocatorContainer::~ScopedAllocatorContainer() { |
| 100 | VLOG(2) << "~ScopedAllocatorContainer " << this << " step " << step_id_ |
no test coverage detected