The constructor often does a two-step initialisation, an allocate() followed by a construct(). If the construct() throws then the previously allocated memory will leak...
AllocatorType<object_t> alloc;
object = alloc.allocate(1);
alloc.construct(object, value);
The constructor often does a two-step initialisation, an
allocate()followed by aconstruct(). If theconstruct()throws then the previously allocated memory will leak...