--- a/src/internfile/mimehandler.cpp
+++ b/src/internfile/mimehandler.cpp
@@ -140,6 +140,17 @@
o_handlers.insert(value_type(handler->get_mime_type(), handler));
}
}
+
+void clearMimeHandlerCache()
+{
+ typedef multimap<string, Dijon::Filter*>::value_type value_type;
+ map<string, Dijon::Filter *>::iterator it;
+ for (it = o_handlers.begin(); it != o_handlers.end(); it++) {
+ delete it->second;
+ }
+ o_handlers.clear();
+}
+
/* Get handler/filter object for given mime type: */
Dijon::Filter *getMimeHandler(const string &mtype, RclConfig *cfg,