S
sevenever
It seems leads to memory leaking on windows + VC.
The delete will not free the memory in such condition?
The delete will not free the memory in such condition?
It seems leads to memory leaking on windows + VC.
The delete will not free the memory in such condition?
sevenever said:It seems leads to memory leaking on windows + VC.
The delete will not free the memory in such condition?
sevenever said:It seems leads to memory leaking on windows + VC.
The delete will not free the memory in such condition?
If you 'delete[]' a pointer NOT obtained from 'new[]', the
program has undefined behaviour. What happens in that case
is really not possible to tell in terms of C++ language.
It's just speculation, and as such is a waste of time.
V
sevenever said:[..]
The reason of this question is I am tracing a memory leaking program,
and finally located to the "delete []" line.
So, obviously I should change "delete []" to "delete".
But can i know what M$ VC8 compiler will do to this code? Just my
curiosity
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.