If you start it, it's up to you to call close on it. This was all worked out here in the thread with subject "Immediate closing of iterators" end of last year and early this year -- you posted a followup agreeing ;-).
/be On Aug 1, 2007, at 6:05 AM, P T Withington wrote: > On 2007-07-31, at 17:34 EDT, Brendan Eich wrote: > >> We are now planning to automate close for all iterators, not just for >> generators, when started from a for-in loop, so you could write your >> own object implementing the iteration protocol, and avoid the >> generator function. But the generator function is probably shortest >> and it's built-in. > > What happens when I call a generator function not in a loop? > _______________________________________________ > Es4-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es4-discuss _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
