Revision: 7291
http://svn.sourceforge.net/mahogany/?rev=7291&view=rev
Author: vadz
Date: 2007-07-02 04:12:09 -0700 (Mon, 02 Jul 2007)
Log Message:
-----------
fix crash during filter cache cleanup when using dynamic modules
Modified Paths:
--------------
trunk/M/src/classes/MFilter.cpp
trunk/M/src/modules/Filters.cpp
Modified: trunk/M/src/classes/MFilter.cpp
===================================================================
--- trunk/M/src/classes/MFilter.cpp 2007-06-17 00:09:31 UTC (rev 7290)
+++ trunk/M/src/classes/MFilter.cpp 2007-07-02 11:12:09 UTC (rev 7291)
@@ -31,7 +31,6 @@
#include "MFilter.h"
#include "MFolder.h"
-#include "MAtExit.h"
#include "modules/Filters.h"
// ----------------------------------------------------------------------------
@@ -50,7 +49,9 @@
// ----------------------------------------------------------------------------
// free the folder filters cache defined below
-static void CleanupFilterCache();
+//
+// this is called by Filters module during unload, so it is not really private
+extern void CleanupFilterCache();
// invalidate the cached representation of the given filter
static void InvalidateFilter(const MFilter *filter);
@@ -66,9 +67,6 @@
static FolderFiltersMap gs_folderFilters;
-// ensure that filter rules are deleted on exit
-static MRunFunctionAtExit gs_runFilterCacheCleanup(CleanupFilterCache);
-
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
@@ -1009,7 +1007,7 @@
// global functions
// ----------------------------------------------------------------------------
-static void
+void
CleanupFilterCache()
{
for ( FolderFiltersMap::const_iterator i = gs_folderFilters.begin();
Modified: trunk/M/src/modules/Filters.cpp
===================================================================
--- trunk/M/src/modules/Filters.cpp 2007-06-17 00:09:31 UTC (rev 7290)
+++ trunk/M/src/modules/Filters.cpp 2007-07-02 11:12:09 UTC (rev 7291)
@@ -52,6 +52,10 @@
class MOption;
+extern void CleanupFilterCache();
+
+MMODULE_CLEANUP(CleanupFilterCache)
+
// ----------------------------------------------------------------------------
// options we use here
// ----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates