P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: Garbage collected class attributes with inside out classes.
by Moron
|
|