Memory allocation overhead (Re: KFileItem)

David Faure faure at kde.org
Sun Sep 1 09:25:45 UTC 2013


On Sunday 01 September 2013 10:46:45 David Faure wrote:
> In the case of KFileItem, this obviously can't be done (huge private class).
> But making it a Q_MOVABLE_TYPE sounds right (since it is movable), we
> should just fix the code that relies on item pointers being stable across
> changes to the QList (e.g. by using QLinkedList).

Ah, I have another idea: KDirListerCache could point to KFileItemPrivate 
pointers instead. These don't change. And IMHO it's ok to break encapsulation 
and tie KDirListerCache to KFileItemPrivate, these classes really work 
together.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list