MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / ~GCodeMachineState

Method ~GCodeMachineState

src/GCodes/GCodeMachineState.cpp:155–167  ·  view source on GitHub ↗

Destructor. This deletes any associated BlockState objects but not any linked MachineState objects.

Source from the content-addressed store, hash-verified

153
154// Destructor. This deletes any associated BlockState objects but not any linked MachineState objects.
155GCodeMachineState::~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
170bool GCodeMachineState::CanRestartMacro() const noexcept

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.45
GetPreviousMethod · 0.45

Tested by

no test coverage detected