diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-16 08:31:50 +0300 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-03-18 18:37:17 +0900 |
| commit | 323382b1896ae350cf5d6b10949c647e4465b3b9 (patch) | |
| tree | c33d2ceeff57a512f1210606023ba4c4f8756c10 /src/kernel/ntqthread.h | |
| parent | 336e61b2302bd34e0e80af1bb38533d4f1a912ba (diff) | |
| download | tqt-323382b1896ae350cf5d6b10949c647e4465b3b9.tar.gz tqt-323382b1896ae350cf5d6b10949c647e4465b3b9.zip | |
Fix TQThreadStorage destruction in the main thread
Before that the allocations of TQThreadStorage objects from the main
thread were never destroyed and memory associated with them were never
freed. The second one isn't a huge problem as at that point program is
terminating anyway (but it still makes valgrind complain). The first one
is the bigger issue as destructors might contain some essential external
cleanups like removing temporary files.
Also make `TQApplication::guiThread()` return `0` when the thread is
destroyed (may happen on the program exiting during destruction of
statics).
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit b1e6f384640525c5a0caceef017848f8ebee46b8)
Diffstat (limited to 'src/kernel/ntqthread.h')
| -rw-r--r-- | src/kernel/ntqthread.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel/ntqthread.h b/src/kernel/ntqthread.h index 3776de41c..5bace1b1a 100644 --- a/src/kernel/ntqthread.h +++ b/src/kernel/ntqthread.h @@ -129,6 +129,7 @@ protected: private: TQThreadInstance * d; friend class TQThreadInstance; + friend class TQThreadStorageData; friend class TQCoreApplicationThread; friend class TQApplication; friend class TQEventLoop; |
