410 Subj : Re: malloc() To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Thu Jun 24 2004 07:40 pm I said that he should check the return of the allocation call for NULL. In a later reply I said that moving from malloc/free to new/delete would not help with the problem if it is an allocation problem. I did not mention this, but as you know new calls malloc so if he is corrupting the heap, overrunning the end of an array or using a NULL pointer then no benefit accrues from changing. You of course already know these things but not all reading this thread do and they are my motivation for writing this. BTW: Most of these same considerations also apply if using the Windows allocation functions. While I also try to free the last malloc'd (or delete the last new'd) item first, I have never found anything that shows why that is better. I just assume that it is better to do it that way. .. Ed > Bob Gonder wrote in message > news:s31md0pebeu3k3i16c64rev5a2d600makh@4ax.com... . 0