• Kevin Modzelewski's avatar
    Make BoxIteratorImpl objects gc-managed · 743cc66a
    Kevin Modzelewski authored
    We were getting some gc issues with these, I think because there
    could be GC pointers behind the GC-opaque shared_ptr pointers.
    
    Just make impl be a conservatively-allocated object so that the
    collector will find it while scanning.  We still need to explicitly
    call BoxIterator::gcAlloc if we store a reference (ex for BoxedEnumerate),
    but this should mean that we keep these alive when they are just on
    the stack (ex when we do a for-each loop over pyElements).
    
    I don't really like how this turned out, but I think the better option
    is to get rid of the indirection.
    743cc66a
iterators.cpp 4.44 KB