Quote:Original post by iMalcQuote:Original post by ZouflainThis much sends alarm bells ringing for me!std::map<const char*,int>::iterator mapit;mapit = section_list.begin();for(;mapit!=section_list.end();++mapit){ delete mapit->first;}
You really really must not use a char* as a map key.
I plan on removing any refference to char* and instead use a string, but that doesn't effect the issue. Deconstructing this (even with a blank deconstructor, or using the above deconstructor in a non-deconstructive function and then a blank deconstructor) causes the program to crash just before terminating. Using the above deconstructor in a normal function causes no issue. Again, everything works until the main() function tries to return(0); if I use a deconstructor (blank, full, or otherwise), then it crashes (not a very major crash, all things considered, but I would like to know why it's doing it).