fix memory leak with opencl