mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2026-02-04 11:59:20 +01:00
Remove All Memory leaks
This commit is contained in:
@@ -12,8 +12,21 @@ GroundTileTypeManager* GroundTileTypeManager::GetInstance() {
|
||||
return m_pInstance;
|
||||
}
|
||||
void GroundTileTypeManager::DestroyInstance() {
|
||||
delete m_pInstance->AIR;
|
||||
delete m_pInstance->DIRT;
|
||||
delete m_pInstance->STONE;
|
||||
delete m_pInstance->LAVA;
|
||||
delete m_pInstance->IRON;
|
||||
delete m_pInstance->BRONZE;
|
||||
delete m_pInstance->GOLD;
|
||||
delete m_pInstance->HARD_LEFT;
|
||||
delete m_pInstance->HARD_RIGHT;
|
||||
delete m_pInstance->HARD_MIDDLE;
|
||||
delete m_pInstance->GRASS;
|
||||
|
||||
delete m_pInstance;
|
||||
}
|
||||
GroundTileTypeManager::GroundTileTypeManager(): AIR(new GroundTileType("", GroundTileTypes::Air)), DIRT(new RandomGroundTile("tiles/dirt/dirt[0].png", GroundTileTypes::Dirt, 5)){
|
||||
GroundTileTypeManager::GroundTileTypeManager() {
|
||||
}
|
||||
// void GroundTileTypeManager::Initialize() {
|
||||
// AIR = new GroundTileType("", GroundTileTypes::Air);
|
||||
|
||||
Reference in New Issue
Block a user