Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*

Subjectfixed :) Reply to this message
Posted byTerry Bogard
Posted on01/28/04 06:33 AM

As everyone suggested, seems I was writing outside of the arrays by one byte, the one for the null-terminator. Now the destructor deletes smoothly, thanks everyone.

What leaves me puzzled is the problem popping out when I deallocate, rather than when I actually write to memory. Shouldn't a memory access & modification in an unallocated area of the heap trigger an access violation, rather than a delete? I thought the memory manager would be more "protective"... but maybe I was being too optimistic :P

Again, thanks a lot

Entire Thread
Subject  Posted byPosted On
*weird c++ destructor behaviour  Terry Bogard01/27/04 12:25 PM
..fixed :)  Terry Bogard01/28/04 06:33 AM
..*Re: fixed :)  Bart T.01/28/04 11:10 AM
...*Re: fixed :)  Terry Bogard01/28/04 12:53 PM
.*Re: weird c++ destructor behaviour  ElSemi01/28/04 04:26 AM
.*Re: weird c destructor behaviour  finaldave01/27/04 06:13 PM
..*Re: weird c destructor behaviour  smf01/28/04 03:18 AM