diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-03 11:38:00 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-01-22 11:50:36 +0000 |
commit | 94e6106d357ca5a1349a2b10a69dd84db34065c8 (patch) | |
tree | 30e139e2eca3d950c69efeb148dcc5a1be00ab4d /src/qml/jsruntime/qv4string_p.h | |
parent | 2f16dd7b1415995109bc44b925cf860236977776 (diff) |
Simplify handling of non GC managed heap data
Let the destroy() method in QV4::String clean up the
unmanaged heap size instead of having a special hook in
the code that sweeps the GC heap.
Change-Id: I989ee99604f0cc67b896d3acc94e200dd5e56a60
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4string_p.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 4890a85724..5b0fd292d6 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -73,11 +73,7 @@ struct Q_QML_PRIVATE_EXPORT String : Base { #ifndef V4_BOOTSTRAP void init(MemoryManager *mm, const QString &text); void init(MemoryManager *mm, String *l, String *n); - void destroy() { - if (!largestSubLength && !text->ref.deref()) - QStringData::deallocate(text); - Base::destroy(); - } + void destroy(); void simplifyString() const; int length() const { Q_ASSERT((largestSubLength && |