Added missing code for releasing OpenCL resources