in reply to Re^2: Garbage collected class attributes with inside out classes.
in thread Garbage collected class attributes with inside out classes.
Come to think of it, there's a problem with classes that don't have (their own) object attributes, but still want destructible class data. Normal garbage collection would likely ignore such a class, so it can't be used as a trigger. You'd need a dummy attribute or some such.
Your more intricate first implementation would still work, if only because the class attributes are implemented as object attributes, so the case doesn't arise.
Unrelatedly, I think your writeup would be easier to read if you swapped the two implementations, so the simple one comes first and can serve as an introduction.
Anno
|
|---|