Commit fd021bf0 authored by Morten Welinder's avatar Morten Welinder

Plug some leaks.

parent 7cc3b74f
2002-04-22 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_shutdown): New function.
* src/libgnumeric.c (gnm_common_init, gnm_shutdown): Fix
prototype.
(gnm_shutdown): Shut down expr_name.
2002-04-19 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_new_error): Remove.
......
2002-04-22 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_shutdown): New function.
* src/libgnumeric.c (gnm_common_init, gnm_shutdown): Fix
prototype.
(gnm_shutdown): Shut down expr_name.
2002-04-19 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_new_error): Remove.
......
2002-04-22 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_shutdown): New function.
* src/libgnumeric.c (gnm_common_init, gnm_shutdown): Fix
prototype.
(gnm_shutdown): Shut down expr_name.
2002-04-19 Morten Welinder <terra@diku.dk>
* src/expr.c (gnm_expr_new_error): Remove.
......
......@@ -574,7 +574,7 @@ static struct {
void
expr_name_init (void)
{
int lp=0;
int lp = 0;
/* Not in global function table though ! */
for (; builtins[lp].name ; lp++) {
......@@ -585,6 +585,20 @@ expr_name_init (void)
}
}
void
expr_name_shutdown (void)
{
int lp = 0;
for (; builtins[lp].name ; lp++) {
GnmNamedExpr *nexpr =
expr_name_lookup (NULL, builtins[lp].name);
if (nexpr) {
expr_name_unref (nexpr);
global_names = g_list_remove (global_names, nexpr);
}
}
}
/******************************************************************************/
/**
* sheet_get_available_names :
......
......@@ -40,6 +40,7 @@ void expr_name_remove_dep (GnmNamedExpr *ne, Dependent *dep);
GList *expr_name_list_destroy (GList *names);
void expr_name_init (void);
void expr_name_shutdown (void);
GList *sheet_get_available_names (Sheet const *sheet);
......
......@@ -111,7 +111,7 @@ gnumeric_check_for_components (void)
* to tell whether we are in GUI or not.
*/
void
gnm_common_init ()
gnm_common_init (void)
{
#ifdef USE_WM_ICONS
gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/gnome-gnumeric.png");
......@@ -164,13 +164,14 @@ gnm_dump_func_defs (char const* filename)
}
void
gnm_shutdown ()
gnm_shutdown (void)
{
application_release_pref_dialog ();
autocorrect_shutdown ();
plugins_shutdown ();
print_shutdown ();
expr_name_shutdown ();
functions_shutdown ();
auto_format_shutdown ();
e_cursors_shutdown ();
......
......@@ -17,7 +17,7 @@ extern char *x_geometry;
void init_init (char const* gnumeric_binary);
poptContext gnumeric_arg_parse (int argc, char *argv []);
void gnm_common_init ();
void gnm_common_init (void);
int gnm_dump_func_defs (char const* filename);
void gnm_shutdown (void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment