Keep It Simple, Stupid | |
PerlMonks |
Re: Garbage collected class attributes with inside out classes.by Moron (Curate) |
on Mar 02, 2007 at 15:11 UTC ( [id://602889]=note: print w/replies, xml ) | Need Help?? |
There's this (not-too-daft) idea going around that the user of a module shouldn't have to "consciously" garbage-collect instances - they should just collapse when the instance reference goes out of scope. But in this example that clearly won't work, so if there's no other way, a DESTROY method is going to be necessary. But I would try to make the class autodestructible from the outset if at all possible - having to DESTROY is certainly going to confuse some people. -M Free your mind
In Section
Meditations
|
|