Array indices (object IDs) are generate by sequences (starting with 1). There is one sequence for each class tree.
When an object is destroyed, it's ID is reclaimed as part of the DESTROY subroutine. Reclaimed ID are maintained in a queue, one per class tree. Reclaimed IDs are doled out first, of course.
Remember: There's always one more bug.
| [reply] |
Do you notice any performance degradation when instantiating and destroying lots and lots of objects across a large-ish (well, more than one class) inheritance tree? I wonder what the effect is, both memory-wise and on lookup speed, of having large and sparse class arrays that hold the object data.
| [reply] |
| [reply] |