Page MenuHomePhabricator

Implement reference counter in OclResourceService for cl_programs
Closed, ResolvedPublic


When using the same class that inherits from OclFilter with the same cl_program
on deletion of the first Filter the cl_program is freed. That case a segmentation fault upon deletion of the next Filter with the same program because the program is already deleted.


This can be prevented by extending the OclResourceServiceImpl with a reference counter for the cl_program. When the counter reaches 0 the cl_program can be deleted without any problem. Also the counter should be threadsafe to prevent race conditions when using OclFilters in different threads.

Event Timeline

New remote branch pushed: bug-15266-oclProgramReferenceCounter

[36fbb9]: Merge branch 'bug-15266-oclProgramReferenceCounter'

Merged commits:

2013-06-14 17:21:32 Eric Heim [70722c]
fixed possible race and added error checking

2013-06-14 16:16:35 Eric Heim [405697]
thread save reference counting of cl program

2013-06-14 15:17:47 Eric Heim [466237]
started implementation of a reference counter to track the number of instances of a cl_program