I keep running into the ERROR: CL_OUT_OF_HOST_MEMORY when I try to run a kernel in a nested for loop with many (around 120) iterations. I did use the “release” functions on the respective context, program , command queue etc after. using EnqueueNDRangeKernel. But after running for 30 iterations or so, I get the out of memory error. Does anyone know what migh be going on??