Fix the memory leak between different slicing cases

Change-Id: I43f043e360101ef7e9aa2cc3b0bf7070cf851680
This commit is contained in:
lane.wei 2022-08-12 21:15:41 +08:00 committed by Lane.Wei
parent 2ac9267e42
commit 9c00469d7f
2 changed files with 11 additions and 3 deletions

View file

@ -416,7 +416,7 @@ private:
friend class Print;
PrintObject(Print* print, ModelObject* model_object, const Transform3d& trafo, PrintInstances&& instances);
~PrintObject() { if (m_shared_regions && -- m_shared_regions->m_ref_cnt == 0) delete m_shared_regions; }
~PrintObject();
void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); }
void config_apply_only(const ConfigBase &other, const t_config_option_keys &keys, bool ignore_nonexistent = false) { m_config.apply_only(other, keys, ignore_nonexistent); }