[SailfishDevel] QML arrays and memory leak

Tomasz Sterna tomek at xiaoka.com
Tue May 5 06:38:21 UTC 2015

Dnia 2015-05-04, pon o godzinie 22:20 +0200, Kim Foder pisze:
> This works great, but it leaks memory fast, and after some time
> (between 1 & 2 hours) the OS kills all running apps!
> Any ideas how I can solve this?

Possibly you are creating/destroying values so fast, that GC does not
have time to kick in. Maybe try calling QJSEngine::collectGarbage() [1]
manually every few iterations. (QQmlEngine subclasses QJSEngine)

[1] http://doc.qt.io/qt-5/qjsengine.html#collectGarbage

(_<^' No problem is insoluble.

More information about the Devel mailing list