Yechuan Xia <xiaozi465@gmail.com> writes:
> Thank you for your reply!
>
> And I've found that it's not the memory of the automaton not being
> freed, but the containers acquired by 'aut.out(i)' not being freed in
> '...something'.
> This problem can be solved by using aut.out_iteraser(i).
Please provide a small example to reproduce the problem so it can be
fixed. What you describe sound unexpected.
Adding
for i in newaut.out(0):
pass
to my previous example does not leak.
> So I'm just wondering why there are two methods for getting out
> edges, and aut.out(i) doesn't allow erasure? And it seems that the
> aut.out(i) method is used by default in the spot's code examples.
out_iteraser does not follow C++'s and Python's convention for
iteration, so it is a bit cumbersome to use. There are very few cases
where out_iteraser() is needed.