mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix an overall crash on safe connections management:
Let some time to check members destructions after connection destruction.
This commit is contained in:
parent
704431d63f
commit
fe453b2f7d
1 changed files with 8 additions and 5 deletions
|
|
@ -74,11 +74,14 @@ public:
|
|||
}
|
||||
~SafeConnection() {
|
||||
mLocker.lock();
|
||||
if (mCore.mCountRef != 0 || mModel.mCountRef != 0)
|
||||
lCritical() << "[SafeConnection] Destruction while still having references. CoreRef=" << mCore.mCountRef
|
||||
<< "ModelRef=" << mModel.mCountRef;
|
||||
mCore.reset();
|
||||
mModel.reset();
|
||||
if (mModel.mCountRef != 0)
|
||||
QTimer::singleShot(1000, mModel.get(), []() {
|
||||
lCritical() << "[SafeConnection] Destroyed 1s ago but a Model is still in memory";
|
||||
});
|
||||
if (mCore.mCountRef != 0)
|
||||
QTimer::singleShot(1000, mCore.get(), []() {
|
||||
lCritical() << "[SafeConnection] Destroyed 1s ago but a Core is still in memory";
|
||||
});
|
||||
mLocker.unlock();
|
||||
}
|
||||
SafeSharedPointer<A> mCore;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue