1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix memory leaks in launcher.

This commit is contained in:
Karlis Senko
2018-04-28 11:56:01 +03:00
parent 7fb7ceaad7
commit 40e6292ed2
6 changed files with 12 additions and 19 deletions

View File

@@ -75,13 +75,6 @@ public:
*/
static void initialize();
/**
* Semi-debug method to track all possible cases of memory leaks
* Used before exiting application
*
*/
static void clear();
/**
* Will load all filesystem data from Json data at this path (normally - config/filesystem.json)
* @param fsConfigURI - URI from which data will be loaded
@@ -103,7 +96,12 @@ public:
*/
static ISimpleResourceLoader * createFileSystem(const std::string &prefix, const JsonNode & fsConfig);
~CResourceHandler() = default;
private:
/** Instance of resource loader */
static std::map<std::string, ISimpleResourceLoader*> knownLoaders;
static CResourceHandler globalResourceHandler;
CResourceHandler() {};
std::unique_ptr<ISimpleResourceLoader> rootLoader;
};