In addition to BrowserUK's succinct and correct answer, I'll point out that most modern OO frameworks (including Moose, Moo, and Class::Tiny) allow you to specify a sub called DEMOLISH instead of DESTROY.
In DEMOLISH there is no need to call SUPER::DEMOLISH - the OO framework automatically takes care of calling all parent DEMOLISH methods in the correct order.
In reply to Re: Why is the base class's destructor not called?
by tobyink
in thread Why is the base class's destructor not called?
by lifang11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |