4 ms·
Defer has the benefit of being dynamic vs the scope tied cleanup.
by wbl 6y ago
Defer has the benefit of being dynamic vs the scope tied cleanup.
- eqvinox 6y agoNot sure I'd call that a benefit, honestly.
- mikepurvis 6y agoI think it depends what problem you're trying to solve. If you're just trying to kill kernel-style GOTO cleanup pyramids, then having it tied to scope with no unwinding or anything dynamic is perfectly adequate.