MCPcopy Create free account
hub / github.com/bwapi/bwapi / ~GameImpl

Method ~GameImpl

bwapi/BWAPI/Source/BWAPI/GameInternals.cpp:54–78  ·  view source on GitHub ↗

----------------------------------------------- DESTRUCTOR -----------------------------------------------

Source from the content-addressed store, hash-verified

52 }
53 //----------------------------------------------- DESTRUCTOR -----------------------------------------------
54 GameImpl::~GameImpl()
55 {
56 this->initializeData();
57
58 // destroy all UnitImpl
59 for (UnitImpl* u : unitArray)
60 {
61 if (u) delete u;
62 }
63 unitArray.fill(nullptr);
64
65 // destroy all PlayerImpl
66 for (int i = 0; i < std::extent<decltype(players)>::value; ++i)
67 {
68 if (players[i]) delete players[i];
69 players[i] = nullptr;
70 }
71
72 // destroy all bullets
73 for (BulletImpl* b : bulletArray)
74 {
75 if (b) delete b;
76 }
77 bulletArray.fill(nullptr);
78 }
79 //---------------------------------------- REFRESH SELECTION STATES ----------------------------------------
80 void GameImpl::refreshSelectionStates()
81 {

Callers

nothing calls this directly

Calls 2

initializeDataMethod · 0.95
fillMethod · 0.80

Tested by

no test coverage detected