diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2015-03-24 22:20:48 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2015-04-14 23:29:04 +0000 |
commit | 91dfab223a64385f6c0d010deafbdc8b2eb69968 (patch) | |
tree | 190035bce886a5754c9ac8b72b5612d28b1aac80 /src/corelib/kernel/qmetatype.h | |
parent | 472216da2d3e88472df3594cbc9eccc6d6b1b44b (diff) |
Add support for unregistering of custom meta types.
This patch addresses a specific Qml problem, where the meta types list
will grow indefinitely when unloading and reloading Qml components over
and over (in an failed effort to save memory).
The implementation is not specific to Qml though, but will cater to all
use-cases where registered types may not live until the application's
termination.
Change-Id: Ic0224dcd19aeb559715ef088b22a30509be2456b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index aa8d826ed9..1e2a860d8c 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -484,6 +484,7 @@ public: int size, QMetaType::TypeFlags flags, const QMetaObject *metaObject); + static bool unregisterType(int type); static int registerNormalizedType(const QT_PREPEND_NAMESPACE(QByteArray) &normalizedTypeName, Deleter deleter, Creator creator, Destructor destructor, |