[SailfishDevel] QML arrays and memory leak

Kim Foder Kim at foder.dk
Wed Jun 10 21:01:24 UTC 2015


Thanks for all your comments on this problem.

I have been using these last couple of months testing many different 
solutions, also those proposed here, but none have worked!

Now I have solved the problem by using an circular buffer instead of an array, 
so when I add a value I just changes the value at the current end of the 
buffer, and moves the end pointer to the next element, if the end pointer 
equals the start pointer that one is moved forward one place.

That's it, no more memory leak, at least none I have detected yet ;)

/Kim


More information about the Devel mailing list