/*! \brief Releases this Program. * * Removes and destroys also all Kernel objects. */ void ocl::Program::release() { if(this->isBuilt()){ removeKernels(); OPENCL_SAFE_CALL( clReleaseProgram (_id)); } _context = 0; _id = 0; }
/*! \brief Destructs this Program.*/ ocl::Program::~Program() { if(_context != nullptr) _context->release(this); removeKernels(); this->release(); _context = 0; _id = 0; }