I am trying to re-use memory in a class by using a static list of previously used memory. It seems to work but I get a crash at exit for MSVC compile. Gcc's compiles exit cleanly. I can't figure out why but I supect something to do with template and static stl list ?? If I don't make the class a template it exits cleanly.. Very simplified code follows : Code: template class Y { static std::list dlist; public: ~Y() { dlist.pop_front(); } }; template std::list Y::dlist; Y x; int main() { return 0; }