3 ms·
> But anyway I doubt that people do it even though they should. A lot of codebases certainly skip such checks. But it's also fairly common to at least have a
by MaulingMonkey 6y ago
> But anyway I doubt that people do it even though they should.
A lot of codebases certainly skip such checks.
But it's also fairly common to at least have a wrapper function that mallocs + triggers a fatal error if it returned null - and then to use that wrapper throughout the codebase. Gamedev tends to roll it's own allocators anyways, or need oddball system allocators for some resources, so they typically have a decent place to stick such checks already.