4 ms·
Cargo-culting from C where you have explicit malloc() and free(). Best practice was to have only 1 return to ensure free() was always called on everything just
by Izkata 4y ago
Cargo-culting from C where you have explicit malloc() and free(). Best practice was to have only 1 return to ensure free() was always called on everything just before the return, so you wouldn't have a memory leak if one was missing from an early return.
- synthc 4y agoI was wondering where this 1 return practice originated from, but yeah, it makes sense in that context.