[krita] plugins/paintops/libpaintop: Fix some memory leaks

Boudewijn Rempt boud at valdyas.org
Thu Mar 17 06:30:29 UTC 2016


Oh, sneaky!

On Wed, 16 Mar 2016, Stefano Bonicatti wrote:

> Git commit 3a994d668160e37794d2b663a1c6c31a1ea90afe by Stefano Bonicatti.
> Committed on 16/03/2016 at 23:02.
> Pushed by stefanobonicatti into branch 'master'.
>
> Fix some memory leaks
>
> KisCurveOptionWidget could leak since it's subclassed and hadn't
> a virtual destructor.
>
> Ui_WdgCurveOption wasn't destroyed when KisCurveOptionWidget was deleted.
>
> M  +1    -0    plugins/paintops/libpaintop/kis_curve_option_widget.cpp
> M  +1    -1    plugins/paintops/libpaintop/kis_curve_option_widget.h
>
> http://commits.kde.org/krita/3a994d668160e37794d2b663a1c6c31a1ea90afe
>
> diff --git a/plugins/paintops/libpaintop/kis_curve_option_widget.cpp b/plugins/paintops/libpaintop/kis_curve_option_widget.cpp
> index 5404c81..a396340 100644
> --- a/plugins/paintops/libpaintop/kis_curve_option_widget.cpp
> +++ b/plugins/paintops/libpaintop/kis_curve_option_widget.cpp
> @@ -80,6 +80,7 @@ KisCurveOptionWidget::KisCurveOptionWidget(KisCurveOption* curveOption, const QS
> KisCurveOptionWidget::~KisCurveOptionWidget()
> {
>     delete m_curveOption;
> +    delete m_curveOptionWidget;
> }
>
> void KisCurveOptionWidget::writeOptionSetting(KisPropertiesConfiguration* setting) const
> diff --git a/plugins/paintops/libpaintop/kis_curve_option_widget.h b/plugins/paintops/libpaintop/kis_curve_option_widget.h
> index 0965ddc..d9a77b3 100644
> --- a/plugins/paintops/libpaintop/kis_curve_option_widget.h
> +++ b/plugins/paintops/libpaintop/kis_curve_option_widget.h
> @@ -37,7 +37,7 @@ class PAINTOP_EXPORT KisCurveOptionWidget : public KisPaintOpOption
>     Q_OBJECT
> public:
>     KisCurveOptionWidget(KisCurveOption* curveOption, const QString &minLabel, const QString &maxLabel, bool hideSlider = false);
> -    ~KisCurveOptionWidget();
> +    virtual ~KisCurveOptionWidget();
>
>     virtual void writeOptionSetting(KisPropertiesConfiguration* setting) const;
>     virtual void readOptionSetting(const KisPropertiesConfiguration* setting);
>

-- 
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org


More information about the kimageshop mailing list