def __del__(self): if self.descriptor: cusparse.destroyMatDescr(self.descriptor) self.descriptor = None
def __del__(self, is_shutting_down=util.is_shutting_down): if is_shutting_down(): return if self.descriptor: cusparse.destroyMatDescr(self.descriptor) self.descriptor = None