delete
delete[]
new[]
new
nullptr
std::unique_ptr
std::move
unique_ptr
assert
head
head == nullptr
sum
release
pushFront
current
new Node{value, head}
head->next
delete head
std::unique_ptr<Node>
front
malloc
void*
calloc
realloc
free
std::bad_alloc
std::nothrow
what()
g++ -std=c++17 -g -fsanitize=address
4
42
delete p;
attempting double-free
q
*q
delete p
-Wall -Wextra
-fsanitize=address
next