From amarok-devel Fri May 25 18:20:22 2012 From: Kevin Funk Date: Fri, 25 May 2012 18:20:22 +0000 To: amarok-devel Subject: Re: Amarok 2.5.0 has a bad memory leak Message-Id: <1601607.CQtIePlqlB () kerberos> X-MARC-Message: https://marc.info/?l=amarok-devel&m=133797020708497 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 _______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel