The specification lists a few unusual possible errors (e.g. CL_OUT_OF_RESOURCES, CL_OUT_OF_HOST_MEMORY) for release/retain operations. I think that the specification should guarantee that these operations succeed, aside from a possible error code to indicate the object is invalid (perhaps also overflow). Consider for example, clReleaseContext(). Should it really be that this can throw an error? How can an application possibly recover?