Don't actually remove deleted entries from m_entries. (#239)

Doing so invalidates entry instance handles.

Fixes #238.
This commit is contained in:
Peter Johnson
2017-09-30 22:55:30 -07:00
committed by GitHub
parent 8edc02b06d
commit 10982e0275
3 changed files with 30 additions and 23 deletions

View File

@@ -221,8 +221,8 @@ class Storage : public IStorage {
std::unique_lock<std::mutex>& lock, bool local);
void SetEntryFlagsImpl(Entry* entry, unsigned int flags,
std::unique_lock<std::mutex>& lock, bool local);
void DeleteEntryImpl(Entry* entry, EntriesMap::iterator it,
std::unique_lock<std::mutex>& lock, bool local);
void DeleteEntryImpl(Entry* entry, std::unique_lock<std::mutex>& lock,
bool local);
// Must be called with m_mutex held
template <typename F>