|
From: Ioannis V. <iv...@em...> - 2003-07-12 00:01:39
|
> -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: Saturday, July 12, 2003 2:04 AM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: RE: [Dev-C++] STL Map question > > > Ioannis: > For older compilers, new doesn't throw an exception. Depending on > configuration and/or implementation, they either return NULL, call an > installable callback function or kill the program. I never talk about legacy stuff. :-) I assume a modern compiler and in particular I assumed Dev-C++. > The implementation of user handling might be absolutely bug-free. It > doesn't help if some other part of the program somehow goofs up and > somehow overwrites memory. Yes. > A dual delete on an object somewhere in the program is a > perfect example > of how a program without any strange pointer manipulation > might perform > memory overwrites, by destroying the heap. Yes, but without being required by the standard, most probably the program would die directly upon the second deletion. In any case we can make only assumptions without the code. And we can also make observations. And I had observed old stuff, char *s, strcmp()s. As I had pointed out in a previous email, replacing all char *s with std::string is a good starting point. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |