I am trying to profile my application using CodeXL and have been receiving warnings showing Memory leaks in different positions where I cannot see any memory leak happening. I am receiving messages like this:
Memory leak detected [Ref = 1, Handle = 0x000000000467D7B0]: Object created by clCreateCommandQueue
This is the code for creating command queue:
commands = clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &err);
I am receiving similar messages for clCreateProgramWithSource, clEnqueueNDRangeKernel, clEnqueueWriteBuffer etc.
I would like to ask what might be the source of the warning or if I have to change any function call.