Closed SoylentGraham closed 7 years ago
Ditto for programs
Hey, not sure what you mean. The maps use smart pointers, so deleting from the map should safely delete the kernel or program too. You can get the maps via map<string, OpenCLXXXPtr> getXXXs()
, and then do as you please, e.g. to erase an item from a map https://stackoverflow.com/questions/10038985/remove-a-key-from-a-c-map
(I didn't want to wrap all of the functionality of std::maps, since C++ has done all that anyway, instead you have direct access to the maps).
P.S. If you delete a kernel which is used in a program it might not play nicely!
P.S. sorry for very late reply, I had notifications turned off and just noticed!
I've noticed you can just delete a kernel, but then the kernels map will contain a dangling pointer. I'd make the change myself, BUT, I've had to remove the use of that kernel map anyway as it asserts for me so I've commented it out...