bugfix:cancel the threads when the class was deleted