Amarok 2.5.0 has a bad memory leak
Kevin Funk
krf at gmx.de
Fri May 25 18:20:22 UTC 2012
On Wednesday 23 May 2012, 15:16, Erik Hovland wrote:
> > Out of curiosity:
> > Why use a QShardPointer and not directly allocate the object on the stack?
> > Would do the same.
>
> You're probably right. I was staring at the code too long to recognize such
> simplicity. Reworked patch attached.
>
> E
Not a good fix either,
you assume that BreadcrumbItem doesn't store the pointer for bLevel. bLevel
gets destroyed and the end of the block, though.
>From a quick glance at the code I actually wonder why the BreadcrumbLevel
class is even needed. It's only really used in the PlaylistBreadcrumbItem
ctor, where just BreadcrumbLevel::name() is referenced.
So, imo, the best fix is to just pass a QString to BreadcrumbItem (here:
internalColumnName) and drop the BreadcrumbLevel class.
Greets
--
Kevin Funk
More information about the Amarok-devel
mailing list