3 ms·
It's more explicit to pass an allocator to things that will allocate than not to, in the same way that other local variables are more explicit than other global
by anonymoushn 5y ago
It's more explicit to pass an allocator to things that will allocate than not to, in the same way that other local variables are more explicit than other global variables. By cultural convention, you'll be able to bring your own allocators to almost any library, so you won't have to let your libraries decide when your program performs heap allocations.