Given that you manually take out the elements from the two `ScopedPtrHashMap` to delete in the appropriated threads, you could use a `std::map`. Due to the thread constraint on those objects, it seems you never want the `ScopedPtrHashMap` delete the items for you.