c = None
caches = None
if current_usage_percentage > self._target_usage and len(q) > 0:
current_usage_percentage = memoryUsagePercentage()
self.logger.debug("Memory usage is: {}%".format(100*current_usage_percentage))
After Change
info, mem/1024.0/1024.0))
total -= mem
current_usage_percentage = total/float(getAvailableRamBytes())*100
gc.collect()
// don"t keep a reference until next loop iteration
cleanupFun = None
q = None