Destructor. This deletes any associated BlockState objects but not any linked MachineState objects.
| 153 | |
| 154 | // Destructor. This deletes any associated BlockState objects but not any linked MachineState objects. |
| 155 | GCodeMachineState::~GCodeMachineState() noexcept |
| 156 | { |
| 157 | #if HAS_MASS_STORAGE || HAS_EMBEDDED_FILES |
| 158 | fileState.Close(); |
| 159 | #endif |
| 160 | BlockState *_ecv_null bs = currentBlockState; |
| 161 | while (bs != nullptr) |
| 162 | { |
| 163 | BlockState *const tempBs = _ecv_not_null(bs); |
| 164 | bs = bs->GetPrevious(); |
| 165 | delete tempBs; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // Return true if all nested macros we are running are restartable |
| 170 | bool GCodeMachineState::CanRestartMacro() const noexcept |
nothing calls this directly
no test coverage detected