clean leak in python