Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9014/src/classes

Modified Files:
        MApplication.cpp 
Log Message:
added an easy way to do stuff on program exit

Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.295
retrieving revision 1.296
diff -b -u -2 -r1.295 -r1.296
--- MApplication.cpp    7 Jul 2004 19:43:36 -0000       1.295
+++ MApplication.cpp    8 Jul 2004 15:19:56 -0000       1.296
@@ -45,4 +45,5 @@
 #include "SendMessage.h"
 #include "ConfigSource.h"
+#include "MAtExit.h"
 
 #include "InitPython.h"
@@ -142,4 +143,8 @@
 MAppBase *mApplication = NULL;
 
+// there is no MAtExit.cpp (it wouldn't contain anything but this line) so do
+// it here
+MRunAtExit *MRunAtExit::ms_first = NULL;
+
 // ----------------------------------------------------------------------------
 // MAppBase - the class which defines the "application object" interface
@@ -191,4 +196,10 @@
    delete m_framesOkToClose;
 
+   // execute MRunAtExit callbacks
+   for ( MRunAtExit *p = MRunAtExit::GetFirst(); p; p = p->GetNext() )
+   {
+      p->Do();
+   }
+
    MObjectRC::CheckLeaks();
    MObject::CheckLeaks();



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to