0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-06 02:28:38 +02:00

ircd:🆑 Skip clRelease calls to destruct null handles.

This commit is contained in:
Jason Volk 2021-03-22 11:06:54 -07:00
parent dbf19fcf4b
commit e68c8a95ed

View file

@ -780,7 +780,8 @@ noexcept
ircd::cl::kern::~kern()
noexcept try
{
call(clReleaseKernel, cl_kernel(handle));
if(likely(handle))
call(clReleaseKernel, cl_kernel(handle));
}
catch(const std::exception &e)
{
@ -925,7 +926,8 @@ noexcept
ircd::cl::code::~code()
noexcept try
{
call(clReleaseProgram, cl_program(handle));
if(likely(handle))
call(clReleaseProgram, cl_program(handle));
}
catch(const std::exception &e)
{
@ -1142,7 +1144,8 @@ noexcept
ircd::cl::data::~data()
noexcept try
{
call(clReleaseMemObject, cl_mem(handle));
if(likely(handle))
call(clReleaseMemObject, cl_mem(handle));
}
catch(const std::exception &e)
{