3 ms·
You also have to abandon operator new and STL unless you want to pretend they never fail.
by kevin_thibedeau 5y ago
You also have to abandon operator new and STL unless you want to pretend they never fail.
- pjmlp 5y agoJust use the no_throw variant, no need to abandon new.
- jeffbee 5y agoRight, I use an allocator that just aborts. Imagining your program can recover from alloc failures has always struck me as fanciful, or at least out of the realm of my experience.
- Inityx 5y agoIt's a legitimate thing in embedded and other memory-constrained circumstances, when you have something like a large cache and an allocation failure can trigger manual pruning or GC.