| 174 | } |
| 175 | |
| 176 | void EngineDebugger::deinitialize() { |
| 177 | if (singleton) { |
| 178 | // Stop all profilers |
| 179 | for (const KeyValue<StringName, Profiler> &E : profilers) { |
| 180 | if (E.value.active) { |
| 181 | singleton->profiler_enable(E.key, false); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | // Flush any remaining message |
| 186 | singleton->poll_events(false); |
| 187 | |
| 188 | memdelete(singleton); |
| 189 | singleton = nullptr; |
| 190 | } |
| 191 | |
| 192 | // Clear profilers/captures/protocol handlers. |
| 193 | profilers.clear(); |
| 194 | captures.clear(); |
| 195 | protocols.clear(); |
| 196 | } |
| 197 | |
| 198 | EngineDebugger::~EngineDebugger() { |
| 199 | if (script_debugger) { |
no test coverage detected