as per the standard the following limitation is put on custom user events:
Does this apply to all API calls that release objects or are there cases where it's fine to free an object while something waits on an user event (e.g. freeing an object in a different context (which may even be associated with a different platform))?NOTE: Enqueued commands that specify user events in the event_wait_list argument of
clEnqueue*** commands must ensure that the status of these user events being waited on are set
using clSetUserEventStatus before any OpenCL APIs that release OpenCL objects except for
event objects are called; otherwise the behavior is undefined.