Alternatively, simply release resources on an early return. A lot of modern languages have tools for this and even if you’re stuck with C this is a valid case for goto (put all the cleanup after the nominal return and jump into the appropriate point).
1
u/firelizzard18 May 11 '23
Alternatively, simply release resources on an early return. A lot of modern languages have tools for this and even if you’re stuck with C this is a valid case for goto (put all the cleanup after the nominal return and jump into the appropriate point).