Added deallocation of SupportLayers (PrintObject::m_support_layers) into the PrintObject destructor and fixed memory leak in modulate_extrusion_by_overlapping_layers().
This commit is contained in:
parent
7cc4b1d8b4
commit
dd3964c8c3
2 changed files with 3 additions and 1 deletions
|
@ -346,10 +346,11 @@ private:
|
|||
friend class Print;
|
||||
|
||||
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)
|
||||
delete m_shared_regions;
|
||||
clear_layers();
|
||||
clear_support_layers();
|
||||
}
|
||||
|
||||
void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue