mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-10 23:45:49 -06:00
asyncjob: Do some cleanup to allow object to be garbage collected
Also ensure we don't carry around references to other objects
This commit is contained in:
parent
d74066da21
commit
1180c9c4e3
@ -137,8 +137,15 @@ class vmmAsyncJob(vmmGObjectUI):
|
||||
self.exit_if_necessary(force_exit=True)
|
||||
|
||||
self.topwin.destroy()
|
||||
self.cleanup()
|
||||
return self._get_error()
|
||||
|
||||
def cleanup(self):
|
||||
vmmGObjectUI.cleanup(self)
|
||||
self.bg_thread = None
|
||||
self.cancel_job = None
|
||||
self.cancel_args = None
|
||||
|
||||
def delete(self, ignore1=None, ignore2=None):
|
||||
thread_active = (self.bg_thread.isAlive() or not self.run_main)
|
||||
if self.cancel_job and thread_active:
|
||||
|
Loading…
Reference in New Issue
Block a user