https://bugzilla.novell.com/show_bug.cgi?id=346987
User sh@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=346987#c26
--- Comment #26 from Stefan Hundhammer 2008-04-16 06:08:30 MST ---
That should be simple enough.
I just introduced a thread-local destructor that calls deleteAllDialogs() from
the UI thread. The YUI destructor still contains another call for that which
will only be relevant if running single-threaded (but in that case it's badly
needed).
Index: YUI.cc
===================================================================
--- YUI.cc (Revision 46444)
+++ YUI.cc (Arbeitskopie)
@@ -81,6 +81,13 @@
}
+void
+YUI::uiThreadDestructor()
+{
+ YDialog::deleteAllDialogs();
+}
+
+
YUI *
YUI::ui()
{
@@ -332,6 +339,7 @@
{
signalYCPThread();
yuiDebug() << "Shutting down UI main loop" << endl;
+ uiThreadDestructor();
return;
}
Index: YUI.h
===================================================================
--- YUI.h (Revision 46706)
+++ YUI.h (Arbeitskopie)
@@ -245,6 +245,15 @@
friend void *start_ui_thread( void *ui_int );
/**
+ * Destructor for the UI thread. This will be called as the last thing the
+ * UI thread does.
+ *
+ * Derived classes can overwrite this. In most cases it makes sense to
call
+ * this base class method in the new implementation.
+ **/
+ virtual void uiThreadDestructor();
+
+ /**
* Signals the ui thread by sending one byte through the pipe
* to it.
**/
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.