Welcome to the Monastery | |
PerlMonks |
Re^2: Garbage collected class attributes with inside out classes.by kyle (Abbot) |
on Mar 02, 2007 at 03:16 UTC ( [id://602819]=note: print w/replies, xml ) | Need Help?? |
...if you define garbage collection of class variables to recover memory as core. Well, I guess I don't. Garbage collection of variables is kind of like taking out the trash in the kitchen. It's not exactly my purpose in life. These objects don't have any purpose in life beyond being an example, but real ones have better things to do than collect garbage. On the other hand, lots of other objects have to have destructors to clean up after themselves, and you don't see me bellyaching about that. The other options I thought about involved weak references... I'd be interested to see that! To some extent, I question whether this is really a "class attribute" in the usual sense of the term, as it only exists when objects exist, but that's just quibbling over names. I agree, but I'm not sure what else I'd call it.
In Section
Meditations
|
|