comparison libpurple/plugin.c @ 27682:386265b369c9

Add PURPLE_LEAKCHECK_HELP environment variable. See ChangeLog.
author Paul Aurich <paul@darkrain42.org>
date Sat, 18 Jul 2009 05:26:23 +0000
parents 4fd6b50d03b3
children 95cc20ede768 c1314a6cefcf
comparison
equal deleted inserted replaced
27681:37b668b8d6c1 27682:386265b369c9
868 } 868 }
869 869
870 if (plugin->info != NULL && plugin->info->destroy != NULL) 870 if (plugin->info != NULL && plugin->info->destroy != NULL)
871 plugin->info->destroy(plugin); 871 plugin->info->destroy(plugin);
872 872
873 if (plugin->handle != NULL) 873 /*
874 g_module_close(plugin->handle); 874 * I find it extremely useful to do this when using valgrind, as
875 * it keeps all the plugins open, meaning that valgrind is able to
876 * resolve symbol names in leak traces from plugins.
877 */
878 if (!g_getenv("PURPLE_LEAKCHECK_HELP"))
879 {
880 if (plugin->handle != NULL)
881 g_module_close(plugin->handle);
882 }
875 } 883 }
876 else 884 else
877 { 885 {
878 PurplePlugin *loader; 886 PurplePlugin *loader;
879 PurplePluginLoaderInfo *loader_info; 887 PurplePluginLoaderInfo *loader_info;