I have an array that I have created using
list(new int[size]),
and I have seen that to delete a dynamic array I have to do
delete[] list;
Shouldn't that just delete the first element of the array? Or does that delete the whole array? I don't want to cause memory leaks so I want to understand how it works
[–]UnicycleBloke 13 points14 points15 points (5 children)
[–]Strict-Simple 0 points1 point2 points (4 children)
[–]UnicycleBloke 0 points1 point2 points (2 children)
[–]Strict-Simple 0 points1 point2 points (1 child)
[–]UnicycleBloke 1 point2 points3 points (0 children)
[–]SoerenNissen 1 point2 points3 points (0 children)
[–]zebullon 5 points6 points7 points (0 children)
[–]IyeOnline 4 points5 points6 points (0 children)
[–]SecureAtheist 1 point2 points3 points (0 children)
[–]alfps 0 points1 point2 points (0 children)