@Tom: Thank you for pointing the NULL thing out. When i debugged the code and sporadically checked which index of the array was currently being deleted, i noticed that a while after 50'000 the index was 9'000. The type 'coord' of the index j was a unsigned short int. So when the number of Cells was greater than 65535 the counter would wrap over to 0 and start deleting the cells with low indices for the second time.
So now only my curiosity question about the closing brackets remain :) Jody On Tue, Oct 2, 2012 at 3:35 PM, jody <[email protected]> wrote: > Thanks for the explanation. > > However, i wrote a small test program with some dummy classes A, B, C > all of which have local variables in their destructors. An in the > constructor of C a B is created, and in the constructor of B an A is > created. The destructor of C deletes the B instance, which in tur > deletes its a instance. A creates an error by deleting an array twice. > Here valgrind correctly shows the error source but it never mentions a > closing bracket. > > So the question now is: under which circumstances are the closing > brackets of destructors listed in a call stack? > > And why is the closing bracket of the destructor listed as the caller > of the destructor itself? > > Jody > > On Tue, Oct 2, 2012 at 5:02 PM, David Faure <[email protected]> wrote: >> On Tuesday 02 October 2012 14:55:57 jody wrote: >>> Th puzzling thing is that WorldTile.cpp:267 and TDWorker.cpp:130 refer >>> to the closing brackets of the respective destructors. >>> What does that mean? >> >> This is where the local variables (the ones created on the stack) get >> deleted, >> obviously. >> >> -- >> David Faure, [email protected], http://www.davidfaure.fr >> Working on KDE, in particular KDE Frameworks 5 >> ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
