4 ms·
It doesn't. Just like the example it replaces. I'm not saying this is the best way to write this code - there are several reasons RAII is better. But in this c
by KeytarHero 11y ago
It doesn't. Just like the example it replaces.
I'm not saying this is the best way to write this code - there are several reasons RAII is better. But in this case, "look how messy non-RAII code is!" isn't the reason.
- st3fan 11y agoThe original example does actually properly deal with exceptions.