summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-17 18:10:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-02 10:35:22 +0100
commit288d3aceee83192bb84d73c60268a18722488adf (patch)
tree643b1710f6e8f5d72782b4f05ce70eeae427a7a9 /configure
parent6a5c6b3ce60f8714824f3ce0224885cb694c1aa4 (diff)
Improve QLibrary global destruction
The previous solution was a global static, which got deleted at the end of the execution of the application or at QtCore unload, whichever came first. Unfortunately, the end of the execution often came first, which is inconvenient: it means the global was deleted before all atexit functions were run, including some QLibrary destructors. Consequently, some QLibrary destructors did not reach the global data and were thus unable to unload their libraries or delete their data properly. The previous solution leaked. This solution instead uses a Q_DESTRUCTOR_FUNCTION, which makes a requirement to destroy only at QtCore unload time. Thus, we're sure that all references have been dropped. Additionally, during the cleanup, do try to unload the libraries that have a single reference count left. That means either a QLibrary that was destroyed without unload(), or a use of the static QLibrary::resolve functions. Change-Id: I12e0943b0c6edc27390c103b368d1b04bfe7e302 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions