An easy fix for you:
1/ If the crash is happening at global startup, instanciate your singleton on demand rather than at global startup
class TemplateManager
{
public:
static TemplateManager& instance()
{
static TemplateManager manager;
return manager;
}
};
2/ If the crash is happening at global exit, create a function to free resources so that you can control the moment it is done. In fact you always want to control when your resources are cleaned up, trust me
On big projects with tons of modules handling resources and dependencies everywhere, your (lack of) design would never work.