| 2125 | } |
| 2126 | |
| 2127 | BfSystem::~BfSystem() |
| 2128 | { |
| 2129 | BP_ZONE("BfSystem::~BfSystem"); |
| 2130 | |
| 2131 | BfLogSys(this, "Deleting BfSystem...\n"); |
| 2132 | BfReportMemory(); |
| 2133 | |
| 2134 | //gPerfManager->StopRecording(); |
| 2135 | //gPerfManager->DbgPrint(); |
| 2136 | |
| 2137 | for (auto& typeItr : mSystemTypeDefs) |
| 2138 | delete typeItr.mValue; |
| 2139 | |
| 2140 | for (auto typeDef : mTypeDefs) |
| 2141 | delete typeDef; |
| 2142 | mTypeDefs.Clear(); |
| 2143 | |
| 2144 | for (auto typeDef : mTypeDefDeleteQueue) |
| 2145 | delete typeDef; |
| 2146 | |
| 2147 | { |
| 2148 | BP_ZONE("Deleting parsers"); |
| 2149 | for (auto parser : mParsers) |
| 2150 | { |
| 2151 | delete parser; |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | for (auto project : mProjects) |
| 2156 | delete project; |
| 2157 | |
| 2158 | for (auto project : mProjectDeleteQueue) |
| 2159 | delete project; |
| 2160 | |
| 2161 | ReleaseAtom(mGlobalsAtom); |
| 2162 | ReleaseAtom(mBfAtom); |
| 2163 | ReleaseAtom(mEmptyAtom); |
| 2164 | ProcessAtomGraveyard(); |
| 2165 | |
| 2166 | BF_ASSERT(mAtomMap.size() == 0); |
| 2167 | |
| 2168 | gBfParserCache->mRefCount--; |
| 2169 | if (gBfParserCache->mRefCount == 0) |
| 2170 | { |
| 2171 | delete gBfParserCache; |
| 2172 | gBfParserCache = NULL; |
| 2173 | } |
| 2174 | |
| 2175 | BfLogSys(this, "After ~BfSystem\n"); |
| 2176 | BfReportMemory(); |
| 2177 | } |
| 2178 | |
| 2179 | #define SYSTEM_TYPE(typeVar, name, typeCode) \ |
| 2180 | typeVar = typeDef = new BfTypeDef(); \ |
nothing calls this directly
no test coverage detected