I have a class containing an unordered_map, nothing special.
I call at on the unordered_map with an invalid key, an std::out_of_range exception is thrown, as expected. However, if I do that, the destructor for the unordered_map ends up throwing an access violation exception.
A little hand debugging and standard library code inspection showed me that the destructor is trying to dereference a NULL pointer while walking through a list. However, I have no idea how that pointer became NULL in the first place. I've checked my code for memory corruption several times and nothing gives.
Also, I've tried my code with several other compilers on several versions of Linux, and in those cases it works fine. MSVC is the only compiler leading me to this.
Has anyone got any ideas? Thanks :)
Aucun commentaire:
Enregistrer un commentaire