mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-13 10:51:12 +00:00
Free G-code result buffers with clear_and_shrink
This commit is contained in:
@@ -2602,16 +2602,13 @@ void GCodeProcessorResult::reset() {
|
||||
//BBS: add mutex for protection of gcode result
|
||||
lock();
|
||||
|
||||
// release rather than clear: these two are sized by the print - one entry per move and one
|
||||
// per g-code line - and a reset is where the memory is expected to go back to the allocator
|
||||
// (see BackgroundSlicingProcess::apply()). The capacity would not be reused anyway: the
|
||||
// result is refilled by move-assigning the processor's own result.
|
||||
moves = std::vector<MoveVertex>();
|
||||
// moves and lines_ends grow with the print: free them, as no reset result reuses the capacity.
|
||||
clear_and_shrink(moves);
|
||||
plate_mass = {};
|
||||
object_masses.clear();
|
||||
body_masses.clear();
|
||||
support_masses.clear();
|
||||
lines_ends = std::vector<size_t>();
|
||||
clear_and_shrink(lines_ends);
|
||||
printable_area = Pointfs();
|
||||
//BBS: add bed exclude area
|
||||
bed_exclude_area = Pointfs();
|
||||
|
||||
Reference in New Issue
Block a user