Subj : Re: Multi-Thread and memory allocation error (or bug in 5.02). To : borland.public.cpp.borlandcpp From : "Martin Catney" Date : Tue Sep 02 2003 01:31 pm Maybe I was not clear enough. With the actual data class I will be able to delete the array in the reverse order but there will be a lot of other allocations occurring with in the application which will be longer lived. This causes the memory to be fragmented and at some point the deallocation, or thread termination, is corrupting the memory or stack. Martin "Bob Gonder" wrote in message news:1e67lvgfqd7d1nev2k3kr1d8ss9g900rg7@4ax.com... > Martin Catney wrote: > > >Changing the order of deleting the array fixed the problem in the example > >but did not help in the real code which is more complex and has other > >objects being created which can not be deleted in reverse order. > > I don't understand that. AFAIK you should always construct in the > order of your member variables, and destruct in reverse order of > construct. I don't think there should ever be a problem with reverse > order destruction. > > .