3 ms·
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 obj
by AnimalMuppet 7y ago
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.
- gpu_explorer 7y agoWhat happens when the program exits?
- AnimalMuppet 7y agoThen it doesn't matter. It matters if you run out of heap before the program exits, though.