def remove(self) : message.note('callback "%(name)s" called %(cnt)d times, filtered %(filtered)d, exceptions raised %(excepted)d', cnt=self.cnt, filtered=self.filtered, excepted=self.excepted, name=self.name) # e.g. Icarus can return null pointer for unsupported reasons, # so test non NULL/None object prior to remove/free if self.cb : vpi.vpi_remove_cb(self.cb) self.vpi_chk_error = vpiChkError() vpi.vpi_free_object(self.cb) self.callbacks.remove(self)
def __del__(self) : vpi.vpi_free_object(self.handle)
def __del__(self) : if self.vpi_i : # final iterate may have free'd object vpi.vpi_free_object(self.vpi_i)