cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

buryang
Journeyman III

Cl_EVENT REFERENCE COUNT

hi all, i add the cl_event pointer to some kernes' wating event list, I guess each time its refcount increase by one, at last I use the clReleaseEvent once to release the cl_event. But this lead to a memory leak, I use the clGetEvetnInfo to see that the cl_event's reference count is not zero. My question is that whether clEnqueueNDRangeKernel just increase the event's reference count which in event_wait_list but not decrease it. And I test the code on nvidia

platform this situation not raise up. So if I run my code on ATI platform I need decrease the event's reference count by myself?

0 Likes
1 Reply
ravikeshri
Journeyman III

We also faced  this issue. You have to decrease the reference count after the event wait is over. 

It is surprising though as we don't call clRetainEvent, then why do we have to call clReleaseEvent specifically? Can somebody explain it please?

0 Likes