code: func (ctx *Ctx) Close() error {
  	var empty C.CUcontext
  	if ctx.CUContext.ctx == empty {
  		return nil
  	}
  
  	if ctx.errChan != nil {
  		close(ctx.errChan)
  		ctx.errChan = nil
  	}
  
  	if ctx.work != nil {
  		close(ctx.work)
  		ctx.work = nil
  	}
  
  	err := result(C.cuCtxDestroy(C.CUcontext(unsafe.Pointer(ctx.CUContext.ctx))))
  	ctx.CUContext.ctx = empty
  	return err
  }
docs: // Close destroys the CUDA context and associated resources that has been created. Additionally, all channels of communications will be closed.