Merge branch 'lh_leak'

This commit is contained in:
Lukáš Hejl 2022-02-05 13:32:49 +01:00
commit b88fc2896e
3 changed files with 4 additions and 1 deletions

View File

@ -836,6 +836,7 @@ extern "C" {
"leak:libnvidia-glcore.so\n" // For NVidia driver. "leak:libnvidia-glcore.so\n" // For NVidia driver.
"leak:libnvidia-tls.so\n" // For NVidia driver. "leak:libnvidia-tls.so\n" // For NVidia driver.
"leak:terminator_CreateDevice\n" // For Intel Vulkan drivers. "leak:terminator_CreateDevice\n" // For Intel Vulkan drivers.
"leak:swrast_dri.so\n" // For Mesa 3D software driver.
; ;
} }
} }

View File

@ -346,10 +346,11 @@ private:
friend class Print; friend class Print;
PrintObject(Print* print, ModelObject* model_object, const Transform3d& trafo, PrintInstances&& instances); PrintObject(Print* print, ModelObject* model_object, const Transform3d& trafo, PrintInstances&& instances);
~PrintObject() { ~PrintObject() override {
if (m_shared_regions && --m_shared_regions->m_ref_cnt == 0) if (m_shared_regions && --m_shared_regions->m_ref_cnt == 0)
delete m_shared_regions; delete m_shared_regions;
clear_layers(); clear_layers();
clear_support_layers();
} }
void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); } void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); }

View File

@ -3754,6 +3754,7 @@ void modulate_extrusion_by_overlapping_layers(
assert(path != nullptr); assert(path != nullptr);
polylines.emplace_back(Polyline(std::move(path->polyline))); polylines.emplace_back(Polyline(std::move(path->polyline)));
path_ends.emplace_back(std::pair<Point, Point>(polylines.back().points.front(), polylines.back().points.back())); path_ends.emplace_back(std::pair<Point, Point>(polylines.back().points.front(), polylines.back().points.back()));
delete path;
} }
} }
// Destroy the original extrusion paths, their polylines were moved to path_fragments already. // Destroy the original extrusion paths, their polylines were moved to path_fragments already.