diff -up gmime-2.2.25/gmime/gmime.c~ gmime-2.2.25/gmime/gmime.c
--- gmime-2.2.25/gmime/gmime.c~	2009-08-13 01:42:55.000000000 +0300
+++ gmime-2.2.25/gmime/gmime.c	2010-03-23 01:59:10.000000000 +0200
@@ -127,7 +127,8 @@ g_mime_shutdown (void)
 {
 	if (--initialized)
 		return;
-	
+
+	g_mime_object_shutdown();
 	g_mime_charset_map_shutdown ();
 	g_mime_iconv_shutdown ();
 }
diff -up gmime-2.2.25/gmime/gmime-object.c~ gmime-2.2.25/gmime/gmime-object.c
--- gmime-2.2.25/gmime/gmime-object.c~	2009-08-13 01:42:55.000000000 +0300
+++ gmime-2.2.25/gmime/gmime-object.c	2010-03-23 02:02:42.000000000 +0200
@@ -724,8 +724,8 @@ type_bucket_foreach (gpointer key, gpoin
 	g_free (bucket);
 }
 
-static void
-type_registry_shutdown (void)
+void
+g_mime_object_shutdown (void)
 {
 	g_hash_table_foreach (type_hash, type_bucket_foreach, NULL);
 	g_hash_table_destroy (type_hash);
@@ -738,6 +738,4 @@ type_registry_init (void)
 		return;
 	
 	type_hash = g_hash_table_new (g_mime_strcase_hash, g_mime_strcase_equal);
-	
-	g_atexit (type_registry_shutdown);
 }
diff -up gmime-2.2.25/gmime/gmime-object.h~ gmime-2.2.25/gmime/gmime-object.h
--- gmime-2.2.25/gmime/gmime-object.h~	2009-08-13 01:42:55.000000000 +0300
+++ gmime-2.2.25/gmime/gmime-object.h	2010-03-23 02:01:08.000000000 +0200
@@ -82,6 +82,7 @@ typedef void (* GMimePartFunc) (GMimeObj
 GType g_mime_object_get_type (void);
 
 void g_mime_object_register_type (const char *type, const char *subtype, GType object_type);
+void g_mime_object_shutdown (void);
 GMimeObject *g_mime_object_new_type (const char *type, const char *subtype);
 
 #ifndef GMIME_DISABLE_DEPRECATED
