Mercurial > pidgin
changeset 5242:fd81a00480ac
[gaim-migrate @ 5613]
Plugins are now destroyed when gaim quits. Less memory leaks will be shown
as a result of this.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 27 Apr 2003 20:39:36 +0000 |
parents | a3bb756635be |
children | f6e0c689a88b |
files | src/main.c src/plugin.c src/plugin.h |
diffstat | 3 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.c Sun Apr 27 17:33:10 2003 +0000 +++ b/src/main.c Sun Apr 27 20:39:36 2003 +0000 @@ -121,7 +121,7 @@ save_prefs(); gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n"); - gaim_plugins_unload_all(); + gaim_plugins_destroy_all(); /* XXX */ #if 0
--- a/src/plugin.c Sun Apr 27 17:33:10 2003 +0000 +++ b/src/plugin.c Sun Apr 27 20:39:36 2003 +0000 @@ -493,6 +493,18 @@ } void +gaim_plugins_destroy_all(void) +{ +#ifdef GAIM_PLUGINS + + gaim_plugins_unload_all(); + + while (plugins != NULL) + gaim_plugin_destroy(plugins->data); + +#endif /* GAIM_PLUGINS */ +} +void gaim_plugins_probe(const char *ext) { #ifdef GAIM_PLUGINS
--- a/src/plugin.h Sun Apr 27 17:33:10 2003 +0000 +++ b/src/plugin.h Sun Apr 27 20:39:36 2003 +0000 @@ -239,10 +239,16 @@ void gaim_plugins_set_search_paths(size_t count, char **paths); /** - * Unloads all registered plugins. + * Unloads all loaded plugins. */ void gaim_plugins_unload_all(void); + +/** + * Destroys all registered plugins. + */ +void gaim_plugins_destroy_all(void); + /** * Probes for plugins in the registered module paths. *