OpenCL Spec Says: The life span of an OpenCL object is determined by its reference count—an internal count of the number of references to the object. When you create an object in OpenCL, its reference count is set to one. Subsequent calls to the appropriate retain API (such as clRetainContext, clRetainCommandQueue) increment the reference count. Calls to the appropriate release API (such as clReleaseContext, clReleaseCommandQueue) decrement the reference count. After the reference count reaches zero, the object’s resources are deallocated by OpenCL.
So i think those cannot be free when process exit... rightnow i just use destructor function attribute as suggested by andrea .. it solves my problem.. Also when i am using opencl profiler to profile some pixman tests, sometime my profiling results are not save.. (one possible reasons it says opencl resource are not freed properly) On Tue, Nov 2, 2010 at 9:02 PM, Soeren Sandmann <[email protected]>wrote: > kb pachauri <[email protected]> writes: > > > Actually what i mean for freeing memory is .. freeing the opencl context, > > releasing command queue, all opencl kernels etc... > > > > sorry for not too clear in my words.. > > > > I dont think this will be freed until i free the context.. > > But why do you want to free it? Don't these things get freed when the > process exits? > > > Soren > -- Kulbhushan Pachauri Lead Engineer SAIT-India Lab Samsung India Software Operation Pvt. Ltd. Bangalore-560093
_______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
