summaryrefslogtreecommitdiff
path: root/src/corelib/plugin/qlibrary.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-09-12 18:29:34 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-09-12 18:29:34 +0300
commit6efece8c8fe18ec3cc01dbc9c02fed3f17208ef4 (patch)
tree243504aa152967c5586bc848f9f62679d51551d0 /src/corelib/plugin/qlibrary.cpp
parenta5984e059385e93ab06eb95cbe12bea5215f7b9d (diff)
parentdbf21da8a66e4cf1a050792c3a5816d2c686a846 (diff)
downloadqtbase-6efece8c8fe18ec3cc01dbc9c02fed3f17208ef4.tar.gz
Merge remote-tracking branch 'origin/tqtc/lts-5.15.7' into tqtc/lts-5.15-opensource
Change-Id: I976ce0c3664c9953dd0019b7d76d3f603583634f
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r--src/corelib/plugin/qlibrary.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index c94adc7a01..739947cee9 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -414,6 +414,11 @@ inline void QLibraryStore::cleanup()
// see https://bugzilla.novell.com/show_bug.cgi?id=622977
// and http://sourceware.org/bugzilla/show_bug.cgi?id=11941
lib->unload(QLibraryPrivate::NoUnloadSys);
+#elif defined(Q_OS_DARWIN)
+ // We cannot fully unload libraries, as we don't know if there are
+ // lingering references (in system threads e.g.) to Objective-C classes
+ // defined in the library.
+ lib->unload(QLibraryPrivate::NoUnloadSys);
#else
lib->unload();
#endif