* added clearining of cuda resources