4 ms·
even when you write your own container, you do not use new and delete.
by mgaunard 9mo ago
even when you write your own container, you do not use new and delete.
- tialaramex 9mo agoAre you sure? It seems as though ultimately Microsoft's STL for example ends up calling std::allocator's allocate function which uses the new operator.
- mgaunard 9mo agoyou would use "operator new" (allocates memory only) not "new" (allocates and constructs, and more if using the new[] variant)
- edflsafoiewq 9mo agoYou might use placement new though.