Added generic singletons facility

<sigh> yes, I know - but we have them - may as well make them consistent and safer
This commit is contained in:
Phil Nash
2018-06-15 21:25:04 +01:00
committed by Martin Hořeňovský
parent 38248f3f2c
commit eb783fc20e
4 changed files with 84 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
#include "catch_exception_translator_registry.h"
#include "catch_tag_alias_registry.h"
#include "catch_startup_exception_registry.h"
#include "catch_singletons.hpp"
namespace Catch {
@@ -84,6 +85,7 @@ namespace Catch {
return *getTheRegistryHub();
}
void cleanUp() {
cleanupSingletons();
delete getTheRegistryHub();
getTheRegistryHub() = nullptr;
cleanUpContext();