blob: a5644ee4eebf2922618fc753e0c7cf17d94c6a9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "resource_manager.h"
#include <string>
#include <unordered_map>
using namespace crepe::api;
ResourceManager* ResourceManager::get_instance(){
static ResourceManager instance;
return &instance;
}
ResourceManager::~ResourceManager(){
m_resources.clear();
}
void ResourceManager::Unload(const std::string& file_path){
if(m_resources.find(file_path) != m_resources.end()){
m_resources.erase(file_path);
}
}
|