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:
bubnikv 2018-10-30 15:24:36 +01:00
parent 63960dfde0
commit 66e97aa4eb
7 changed files with 67 additions and 34 deletions

View file

@ -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; }