Subj : Re: New and Delete memory operators To : comp.programming From : amorgan Date : Wed Jul 06 2005 09:30 pm In article <1120681284.766126.81540@g43g2000cwa.googlegroups.com>, scoi wrote: >Why , sometime, when I free memory with "delete [] .." I receive an >error message? > >example: >I need an amount of memory and I do it with "new".The function is >finished and I have to free that memory. In this case I do it with >"delete". > >Sometime is ok and another time I see an error. Why? Because you are freeing memory twice or because you allocated with 'new' and freed with 'delete []' or vice versa or because you overwrote the memory you allocated or because you overwrote some other bit of memory you allocated or because you have a multi-threaded app and linked with the single-threaded version of the library or because you have a buggy library. In short - because you have a bug. Without knowing more it is impossible to tell. Alan -- Defendit numerus .