From cbba21294daa127baed4ea13c53db50c3823a59c Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 10 Nov 2019 17:47:51 +0100 Subject: [PATCH] Free some arrays in iplocallab.cc --- rtengine/iplocallab.cc | 10 ++++++++-- rtgui/controlspotpanel.cc | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index ba5b2b43e..2c4633b21 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -8530,7 +8530,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } transit_shapedetect(7, loctemp.get(), nullptr, nullptr, buflight, bufchrom, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); - + buflight.free(); + bufsh.free(); if (params->locallab.spots.at(sp).recurs) { original->CopyFrom(transformed); float avge; @@ -11396,6 +11397,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o transit_shapedetect(1, bufexporig.get(), nullptr, originalmaskexp.get(), buflight, bufl_ab, buf_a_cat, buf_b_cat, nullptr, false, hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); bufexporig.reset(); blend2.free(); + buflight.free(); + if (params->locallab.spots.at(sp).recurs) { original->CopyFrom(transformed); float avge; @@ -12444,7 +12447,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o //bufcolfin add for merge if (!(usergb && spez)) { transit_shapedetect(smerge, bufcolorig.get(), bufcolfin.get(), originalmaskcol.get(), buflight, bufchro, buf_a, buf_b, bufhh, HHcurve, hueref, chromaref, lumaref, sobelref, meansob, blend2, lp, original, transformed, cx, cy, sk); - if(blends) blend2.free(); + if(blends) { + blend2.free(); + } + buflight.free(); } if (params->locallab.spots.at(sp).recurs) { diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 9cea72de4..2322298a7 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -381,13 +381,13 @@ ControlSpotPanel::ControlSpotPanel(): maskBox->pack_start(*deltae_); maskBox->pack_start(*scopemask_); // maskBox->pack_start(*shortc_); - Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator()); - maskBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); +// Gtk::HSeparator *separator = Gtk::manage(new Gtk::HSeparator()); +// maskBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); // maskBox->pack_start(*ctboxmergemethod); - Gtk::HSeparator *separator1 = Gtk::manage(new Gtk::HSeparator()); - maskBox->pack_start(*separator1, Gtk::PACK_SHRINK, 2); +// Gtk::HSeparator *separator1 = Gtk::manage(new Gtk::HSeparator()); +// maskBox->pack_start(*separator1, Gtk::PACK_SHRINK, 2); maskBox->pack_start(*lumask_); // maskBox->pack_start(*savrest_);