3 ms·
Wrong. You need to exit before resource allocations :-). And in general if you allocate resources in most functions you're doing it wrong. Need global resource
by jstimpfle 9y ago
Wrong. You need to exit before resource allocations :-). And in general if you allocate resources in most functions you're doing it wrong. Need global resource managers. Stack variables should only very rarely be resource owners.
- monocasa 9y agoRAII works just as well for heap allocated objects as it does for stack allocated ones.