diff options
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 795a505742..92eadb0540 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -269,6 +269,16 @@ private: void doDeleteInEngineThread(); }; +/* + This function should be called prior to evaluation of any js expression, + so that scarce resources are not freed prematurely (eg, if there is a + nested javascript expression). + */ +inline void QQmlEnginePrivate::referenceScarceResources() +{ + scarceResourcesRefCount += 1; +} + /*! Returns true if the calling thread is the QQmlEngine thread. */ |