fix(DOtherSide): Crash when a QSortFilterModel is collected by nim GC
QSortFilterModel can be used as sourceModel in proxy models. Proxy models rely on receiving the `QObject::destroyed` event when the source model is destroyed to clean the internal data. Calling `QObject::disconnect` will also disconnect any connections to the `QObject::destroyed` event leaving dangling pointers in the proxy models.
This commit is contained in:
parent
e201499994
commit
56b616f38b
|
@ -875,7 +875,6 @@ void dos_qvariant_setArray(::DosQVariant *vptr, int size, ::DosQVariant **array)
|
|||
void dos_qobject_delete(::DosQObject *vptr)
|
||||
{
|
||||
auto qobject = static_cast<QObject *>(vptr);
|
||||
qobject->disconnect();
|
||||
delete qobject;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue