Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
AnimalMuppet
· 6y ago · 0 comments
You made the moved-to pointer point to the moved-from allocated heap data. Now nothing points to the heap data that was initially allocated by the moved-to object. So if you don't delete[] the moved-to data pointer, then you leaked 32 bytes of heap.
Comments
[–]
gpu_explorer
6y ago
What happens when the program exits?
[–]
AnimalMuppet
OP
6y ago
Then it doesn't matter. It matters if you run out of heap
before
the program exits, though.