The foo.py example prints increasing values for me. I attach the output.

I am using a WSL environment(Linux version 4.4.0-19041-Microsoft).
I use gcc version 9.3.0 to compile the tarball.

The Spot version I used was Spot-2.9.7, now I have updated to Spot-2.10.3 and they produce the same output. 

On Sat, Jan 29, 2022 at 4:00 AM Alexandre Duret-Lutz <adl@lrde.epita.fr> wrote:
Yechuan Xia <xiaozi465@gmail.com> writes:

> On my machine, an example like this results in a leak:
>
> aut = spot.translate(spot.formula('(F(p & X(p & Xh)) & G((!h | Xp) &
> (!m | X!p))) | (F(h & X!p) & G((!m | X!p) & (!p | X(!p | X!h))))'))
> for i in range(100):
>   newaut = spot.automaton(aut.to_str())
>   for i in range(0, 10):
>     for t in newaut.out(i):
>       pass
>   del newaut
>   print(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
>
> Indeed, the out_iteraser method is really a bit inconvenient to use ;
> )

The attached example always print the same value for me, so no leak.
Do you see those values increasing?

Can you tell me more about your setup?  What version of Spot do
you use ? did you build it yourself (and if so how), or did you use some
precompiled binaries ?