[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Memory leak?
From: Michael Thaler <michael.thaler () physik ! tu-muenchen ! de>
Date: 2005-10-12 12:07:14
Message-ID: 200510121407.14751.michael.thaler () physik ! tu-muenchen ! de
[Download RAW message or body]
Hello,
I think I introduced a memory leak in the dropshadow plugin. I do the
following:
KisLayerSP shadowLayer = new
KisLayer( KisColorSpaceFactoryRegistry::instance() ->
getColorSpace(KisID("RGBA",""),"" ), "Shadow");
KisLayerSP bShadowLayer;
...
if( blurshadow )
{
bShadowLayer = new KisLayer( KisColorSpaceFactoryRegistry::instance()
-> getColorSpace(KisID("RGBA",""),"" ), "bShadow");
gaussianblur(shadowLayer, bShadowLayer, rect, blurradius, blurradius,
BLUR_RLE, progress);
shadowLayer = bShadowLayer;
}
I think I should do something like
delete shadowLayer
before I do
shadowLayer = bShadowLayer
But that crashed Krita. Basically shadowLayer is the original shadowLayer and
bShadowLayer holds the blurred version of the shadow. So after I blurred the
shadow, I want shadowLayer to point to the blurred version. How should I
delete the original ShadowLayer?
Greetings,
Michael
P.S.: I also wrote a filter that uses gimps gaussian blur to blur an image. It
works really fast also with really huge kernels like 25x25. The problem is,
that it is RGBA8 only for the moment, so I wont commit it. For the dropshadow
plugin this is not a problem, since the shadow layer is always RGBA8 for now,
anyway. (I don't know if this makes sense or not). For noe basically the
whole gaussian blur filter is in the dropshadow plugin source.
Greetings,
Michael
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic