MountPointManager becomes owner of tdata
| 51 | |
| 52 | // MountPointManager becomes owner of tdata |
| 53 | bool MountPointManager::add(const wchar_t *mountpoint, CryptThreadData* tdata) |
| 54 | { |
| 55 | bool res = true; |
| 56 | try { |
| 57 | auto res = m_tdatas.emplace(mountpoint, tdata); |
| 58 | _ASSERT(res.second); // that it wasn't already there |
| 59 | } catch (...) { |
| 60 | delete tdata; |
| 61 | res = false; |
| 62 | } |
| 63 | return res; |
| 64 | } |
| 65 | |
| 66 | CryptThreadData *MountPointManager::get(const wchar_t *mountpoint) |
| 67 | { |