If a buffer is created with CL_MEM_ALLOC_HOST_PTR, does that buffer have to be manually deallocated, or is that automatically done inside of clReleaseMemObject when its counter reaches zero? Similarly, if I use the C++ API wrapper, would a buffer object going out of scope automatically deallocate the host allocated memory? I appreciate the help clarifying this for me.
The buffer does not have to be manually deallocated. All you need to is release the buffer using clReleaseMemObject. When the cl_mem object is released by the OpenCL implementation the allocated data storage will also be freed.