Mercurial > pidgin.yaz
diff 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 |
line wrap: on
line diff
--- a/libpurple/plugin.c Sat Jul 18 05:08:25 2009 +0000 +++ b/libpurple/plugin.c Sat Jul 18 05:26:23 2009 +0000 @@ -870,8 +870,16 @@ if (plugin->info != NULL && plugin->info->destroy != NULL) plugin->info->destroy(plugin); - if (plugin->handle != NULL) - g_module_close(plugin->handle); + /* + * I find it extremely useful to do this when using valgrind, as + * it keeps all the plugins open, meaning that valgrind is able to + * resolve symbol names in leak traces from plugins. + */ + if (!g_getenv("PURPLE_LEAKCHECK_HELP")) + { + if (plugin->handle != NULL) + g_module_close(plugin->handle); + } } else {
