RIght after I create a user event, I check the reference count, and it equals 2.
Does this make sense? I was expecting it to be equal to 1.
Reference counters counts not only your references, but also created internally by OpenCL implementation. References can be used to catch memory leaks or debugging. The OpenCL specification says that references cannot be used in general purposes in an applications.