2 ms·
And more importantly, you can choose what destructor to call. This is perhaps what's most underrated about defer, because defer can select among many different
by smj-edison 5mo ago
And more importantly, you can choose what destructor to call. This is perhaps what's most underrated about defer, because defer can select among many different destructors possible, at multiple different levels (group free with arenas, individual free, etc).
- zephen 5mo agoOr even whether you need a destructor, or something simpler, like nulling out a pointer or two to break a reference loop. defer is a perfectly general structured flow concept; it only cares about when you do something, and is completely orthogonal to what you need to accomplish.
- reactordev 5mo agoI'm not sure the folks responding can tell the difference.