def close(self): '''Deconstruct the object and break circular references After calling this the object is unusable, not even for saving.''' self.log.debug('close() <- %#x', id(self)) for frame in traceback.extract_stack(): self.log.debug('%s', frame) super().close() if self._domain_event_callback_id is not None: self.vmm.libvirt_conn.domainEventDeregisterAny( self._domain_event_callback_id) self._domain_event_callback_id = None # Only our Lord, The God Almighty, knows what references # are kept in extensions. del self._extensions for vm in self.domains: vm.close() self.domains.close() del self.domains self.vmm.close() del self.vmm del self.host if self.__locked_fh: self._release_lock()
def close(self): '''Deconstruct the object and break circular references After calling this the object is unusable, not even for saving.''' self.log.debug('close() <- %#x', id(self)) for frame in traceback.extract_stack(): self.log.debug('%s', frame) super().close() if self._domain_event_callback_id is not None: self.vmm.libvirt_conn.domainEventDeregisterAny( self._domain_event_callback_id) self._domain_event_callback_id = None # Only our Lord, The God Almighty, knows what references # are kept in extensions. del self._extensions for vm in self.domains: vm.close() self.domains.close() del self.domains self.vmm.close() del self.vmm del self.host if self.__locked_fh: self._release_lock()