mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Free plugin autocompleters on shutdown
This commit is contained in:
parent
8831715f7a
commit
9d96ae5190
@ -31,7 +31,7 @@ static GHashTable *autocompleters;
|
||||
void
|
||||
autocompleters_init(void)
|
||||
{
|
||||
autocompleters = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
autocompleters = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)autocomplete_free);
|
||||
}
|
||||
|
||||
void
|
||||
@ -73,3 +73,8 @@ autocompleters_reset(void)
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
}
|
||||
|
||||
void autocompleters_destroy(void)
|
||||
{
|
||||
g_hash_table_destroy(autocompleters);
|
||||
}
|
@ -29,5 +29,6 @@ void autocompleters_init(void);
|
||||
void autocompleters_add(const char *key, char **items);
|
||||
char* autocompleters_complete(char *input, int *size);
|
||||
void autocompleters_reset(void);
|
||||
void autocompleters_destroy(void);
|
||||
|
||||
#endif
|
||||
|
@ -413,6 +413,8 @@ plugins_shutdown(void)
|
||||
#ifdef PROF_HAVE_C
|
||||
c_shutdown();
|
||||
#endif
|
||||
|
||||
autocompleters_destroy();
|
||||
}
|
||||
|
||||
gchar *
|
||||
|
Loading…
Reference in New Issue
Block a user