diff --git a/Linphone/tool/thread/SafeConnection.hpp b/Linphone/tool/thread/SafeConnection.hpp index 83e80c2fd..375757dce 100644 --- a/Linphone/tool/thread/SafeConnection.hpp +++ b/Linphone/tool/thread/SafeConnection.hpp @@ -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 mCore;