diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-19 05:56:36 +0300 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-04-03 09:02:22 +0900 |
| commit | f2504a8f49b5311070eff4245b87ee2f685ae28a (patch) | |
| tree | bc8039e8a6afcc3f6aeaf26253ab770c2c3c638e /src/styles/qcommonstyle.cpp | |
| parent | b000ed6ad6d2b02a3e8c84675ff1abfa3b3df6ce (diff) | |
| download | tqt-f2504a8f49b5311070eff4245b87ee2f685ae28a.tar.gz tqt-f2504a8f49b5311070eff4245b87ee2f685ae28a.zip | |
Improve TQFont-related cleanup
Improve TQFont cleanup making sure that all instances of TQFont are
destroyed before TQApplication (or specifically before disconnect from
X11). This gets reed of several valgrind complains about leaks deep
inside fontconfig.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit ffbaaf0e1c181dd0f0d8ad7b273530f7cda086da)
Diffstat (limited to 'src/styles/qcommonstyle.cpp')
| -rw-r--r-- | src/styles/qcommonstyle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index a9bfbcf28..f5c57d46f 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -165,6 +165,10 @@ static TQString TQFrame_static_string("TQFrame"); static TQString TQWidget_static_string("TQWidget"); static TQStyleControlElementData* TQStyleControlElementData_null = NULL; +static void tqt_style_control_element_data_null_cleanup() { + delete TQStyleControlElementData_null; + TQStyleControlElementData_null =0; +} #include <ntqmetaobject.h> @@ -805,6 +809,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi else { if (!TQStyleControlElementData_null) { TQStyleControlElementData_null = new TQStyleControlElementData(); + tqAddPostRoutine(tqt_style_control_element_data_null_cleanup); } TQStyleControlElementData &ceData = *TQStyleControlElementData_null; return ceData; |
