Comment 2 for bug 738188

Revision history for this message
Andrew Wilkins (axwalk) wrote :

I've looked into this a little bit further, and found what is going on. Take for example the following program:
    r_os = conn.modules.os
    for i in range(100):
        d = r_os.__dict__ #(1)
        print len(d.items()) #(2)

What occasionally will happen is this: (1) will incur a "getattr" message, which returns a __dict__. The __dict__ is marshalled with its items. Before the items are unmarshalled in one iteration, they are garbage collected from the previous iteration.