Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv25926/src/classes
Modified Files:
MApplication.cpp
Log Message:
call Py_Finalize() to avoid memory leak reports when using Python
Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.287
retrieving revision 1.288
diff -b -u -2 -r1.287 -r1.288
--- MApplication.cpp 12 Jan 2004 23:44:07 -0000 1.287
+++ MApplication.cpp 13 Jan 2004 23:40:24 -0000 1.288
@@ -35,6 +35,4 @@
#endif // USE_PCH
-#include "MPython.h"
-
#include "MFolder.h"
#include "Message.h"
@@ -140,6 +138,7 @@
#ifdef USE_PYTHON
- // only used here
+ // only used here, defined in src/Python/InitPython.cpp
extern bool InitPython(void);
+ extern void FreePython(void);
#endif //Python
@@ -523,5 +522,5 @@
// having the same error message each time M is started is annoying, so
// give the user a possibility to disable it
- if ( READ_CONFIG(m_profile, MP_USEPYTHON) && ! InitPython() )
+ if ( READ_CONFIG(m_profile, MP_USEPYTHON) && !InitPython() )
{
// show the error messages generated before first
@@ -700,8 +699,8 @@
#endif // OS_WIN
-#ifdef USE_PYTHON_DYNAMIC
- // free python DLL: this is ok to call even if it wasn't loaded
- FreePythonDll();
-#endif // USE_PYTHON_DYNAMIC
+#ifdef USE_PYTHON
+ // shut down Python interpreter
+ FreePython();
+#endif // USE_PYTHON
}
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates