3 ms·
> This costs heap allocations I'd like to point out that this is not always the case. Some libraries, especially those with embedded systems in mind, allow you
by spacechild1 6y ago
> This costs heap allocations
I'd like to point out that this is not always the case. Some libraries, especially those with embedded systems in mind, allow you to provide your own memory buffer (which might live on the stack), where the object should be constructed. Others allow you to pass your own allocator.