-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Description
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);
Reactions are currently unavailable