added tileset initialization in constructor (to NULL), tileset destruction in destructor; and tileset destruction when replaced in ::shadowTiles method. (this was leaking, or did I miss something ?)
svn path=/trunk/KDE/kdebase/workspace/; revision=1019165
This commit is contained in:
parent
eca2dcabac
commit
290b5a8cc9
1 changed files with 18 additions and 4 deletions
|
@ -72,6 +72,8 @@ namespace Nitrogen
|
|||
KCommonDecorationUnstable(b, f),
|
||||
colorCacheInvalid_(true),
|
||||
size_grip_( 0 ),
|
||||
shadowTiles_( 0 ),
|
||||
glowTiles_( 0 ),
|
||||
helper_(*globalHelper),
|
||||
initialized_( false )
|
||||
{ qAddPostRoutine(oxkwincleanupBefore); }
|
||||
|
@ -83,6 +85,10 @@ namespace Nitrogen
|
|||
// delete sizegrip if any
|
||||
if( hasSizeGrip() ) deleteSizeGrip();
|
||||
|
||||
// delete tilesets
|
||||
if( shadowTiles_ ) delete shadowTiles_;
|
||||
if( glowTiles_ ) delete glowTiles_;
|
||||
|
||||
}
|
||||
|
||||
//___________________________________________
|
||||
|
@ -741,10 +747,18 @@ namespace Nitrogen
|
|||
&& opt.glowColor == opt.glowColor)
|
||||
optionChanged = false;
|
||||
|
||||
if (active && glowTiles_ && !optionChanged)
|
||||
return glowTiles_;
|
||||
else if (!active && shadowTiles_ && !optionChanged)
|
||||
return shadowTiles_;
|
||||
if (active && glowTiles_ )
|
||||
{
|
||||
|
||||
if( optionChanged) delete glowTiles_;
|
||||
else return glowTiles_;
|
||||
|
||||
} else if (!active && shadowTiles_ ) {
|
||||
|
||||
if( optionChanged ) delete shadowTiles_;
|
||||
else return shadowTiles_;
|
||||
|
||||
}
|
||||
|
||||
TileSet *tileSet = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue