apol added a comment.
Correct, I wanted to fix all the allocations as the commit message says, then I realised it wasn't even working well when I added the unit test, so I fixed that too. The problem with the allocation is that it's allocating for the remaining part of the field and freeing again the rest every time we read each element of the list. This showed up in heaptrack for Discover. REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D14162 To: apol, #frameworks, dfaure Cc: dfaure, anthonyfieroni, kde-frameworks-devel, michaelh, ngraham, bruns