Revert "QDbus: Avoid memory leak in registerComplexDBusType"
This reverts commit 4c1df115ec.
We cannot guarantee that there are no more QMetaType
instances that reference the interfaces being destroyed.
All such instances will become invalid after the interface
destruction with no way to verify that.
Pick-to: 6.6 6.5
Change-Id: Iad17fe88753143734b8b817dda184e3c3818575c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
df485fff26
commit
8a3330be38
|
|
@ -116,11 +116,8 @@ static int registerComplexDBusType(const QByteArray &typeName)
|
|||
{
|
||||
~Hash()
|
||||
{
|
||||
for (QMetaType entry : std::as_const(*this)) {
|
||||
auto iface = static_cast<const QDBusRawTypeHandler *>(entry.iface());
|
||||
for (QMetaType entry : *this)
|
||||
QMetaType::unregisterMetaType(std::move(entry));
|
||||
delete iface;
|
||||
}
|
||||
}
|
||||
} hash;
|
||||
QMutexLocker lock(&mutex);
|
||||
|
|
|
|||
Loading…
Reference in New Issue