mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Reduced memory leaks in ConfigDef / PrintConfigDef
Deleted unsafe default copy constructors / operators in Model / ModelObject / ModelInstance / ModelVolume Fixed some issues with copying the Model / ModelObject / ModelInstance / ModelVolume inside Print::apply() Fixed some invalidation issues in Print::apply() Temporarily renamed the Slic3rPE profile directory to Slic3rPE-alpha.
This commit is contained in:
@@ -1022,6 +1022,12 @@ typedef std::map<t_config_option_key, ConfigOptionDef> t_optiondef_map;
|
||||
class ConfigDef
|
||||
{
|
||||
public:
|
||||
~ConfigDef() {
|
||||
for (std::pair<const t_config_option_key, ConfigOptionDef> &def : this->options)
|
||||
delete def.second.default_value;
|
||||
this->options.clear();
|
||||
}
|
||||
|
||||
t_optiondef_map options;
|
||||
|
||||
bool has(const t_config_option_key &opt_key) const { return this->options.count(opt_key) > 0; }
|
||||
|
||||
Reference in New Issue
Block a user