Removed memory leaks due to Plater::priv::config not being deleted

This commit is contained in:
Enrico Turri 2019-06-27 15:23:03 +02:00
parent 97bb4a80cc
commit 6cfb9bec36

View file

@ -1526,6 +1526,7 @@ struct Plater::priv
static const std::regex pattern_prusa;
priv(Plater *q, MainFrame *main_frame);
~priv();
void update(bool force_full_scene_refresh = false);
void select_view(const std::string& direction);
@ -1795,6 +1796,12 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
camera.set_type(get_config("use_perspective_camera"));
}
Plater::priv::~priv()
{
if (config != nullptr)
delete config;
}
void Plater::priv::update(bool force_full_scene_refresh)
{
// the following line, when enabled, causes flickering on NVIDIA graphics cards