Unregister custom SettingsRegistries in the test Teardown

This commit is contained in:
amzn-sj
2021-05-24 15:06:04 -07:00
parent 89cde021b2
commit 1a360094d2
4 changed files with 25 additions and 2 deletions
+6 -1
View File
@@ -118,7 +118,6 @@ namespace AssetBundler
{
AZ::SettingsRegistry::Register(&m_registry);
registry = &m_registry;
}
else
{
@@ -157,6 +156,12 @@ namespace AssetBundler
delete m_data->m_localFileIO;
AZ::IO::FileIOBase::SetInstance(m_data->m_priorFileIO);
auto settingsRegistry = AZ::SettingsRegistry::Get();
if(settingsRegistry == &m_registry)
{
AZ::SettingsRegistry::Unregister(settingsRegistry);
}
m_data->m_gemInfoList.set_capacity(0);
m_data->m_gemSeedFilePairList.set_capacity(0);
m_data->m_application.get()->Stop();