free createKernel methods after used