We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2458f3 commit 5c30cf5Copy full SHA for 5c30cf5
sycl/source/detail/device_global_map.hpp
@@ -88,7 +88,11 @@ class DeviceGlobalMap {
88
if (findDevGlobalByValue != MPtr2DeviceGlobal.end())
89
MPtr2DeviceGlobal.erase(findDevGlobalByValue);
90
91
- MDeviceGlobals.erase(DevGlobalIt);
+ // Must properly free the memory, will do in
92
+ // removeAssociatedResources(). Now we blank the key so it isn't used.
93
+ auto h = MDeviceGlobals.extract(DevGlobalIt);
94
+ h.key() = "";
95
+ MDeviceGlobals.insert(std::move(h));
96
}
97
98
0 commit comments