My example is not about "omitting the final explicit destructor", it's about forgetting the final explicit destructor. That code block can die in at least two places ($dbh set to RaiseError, or $elapsed being zero) and then never call the destructor, leading to memory leaks and/or unreleased locks. Creating the lock-release right at lock acquisition prevents such oversights, and having to disable each and every such instance is foolish.
In reply to Re^11: Warnings on unused variables?
by Corion
in thread Warnings on unused variables?
by AZed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |