diff options
author | Darin Adler <darin@src.gnome.org> | 2000-09-27 00:07:33 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2000-09-27 00:07:33 +0000 |
commit | e8af12ac65b5f5b4f2a5f055166a5f7d8580e525 (patch) | |
tree | 6d65095b33955cc35cf65d535aefeda1fbbefe46 /src/nautilus-main.c | |
parent | d6f51369b565f566af792f02ae21336cd38d18cb (diff) | |
download | nautilus-e8af12ac65b5f5b4f2a5f055166a5f7d8580e525.tar.gz |
Fix more storage leaks.
* components/tree/nautilus-tree-node.c: (nautilus_tree_node_new):
Get rid of extra allocation of node->details that caused a storage
leak.
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_insert_model_node): Add a g_free.
(free_uri_to_node_map_entry), (free_uri_to_hack_node_map_entry),
(nautilus_tree_view_destroy): Free the keys of the hash table.
(tree_expand_callback), (tree_collapse_callback),
(tree_select_row_callback): Added missing g_free.
(nautilus_tree_view_item_at): Removed an excess g_strdup.
* libnautilus-extensions/nautilus-preference.c:
(preference_initialize_if_needed): Destroy the global preference
table on exit.
(preference_hash_node_free_func): Free the hash key as well as
the node value.
(preference_register): Use strdup on keys as then are entered
into the hash table.
(preference_hash_node_lookup_with_registration): Remove the strdup
in here since preference_register now handles it.
(destroy_global_preference_table): Renamed and simplified the
existing unused function.
* libnautilus-extensions/nautilus-volume-monitor.c:
(nautilus_volume_monitor_destroy), (free_volume): Free the volume
itself, not just the fields within it.
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location): Added a missing
g_free.
* src/nautilus-sidebar-tabs.c: (tab_item_destroy_cover),
(nautilus_sidebar_tabs_destroy): Free the tab items too, not just
the list they are stored in.
* src/nautilus-switchable-search-bar.c:
(search_bar_preference_changed_callback): Added a missing g_free.
* libnautilus-extensions/nautilus-theme.c: (free_default_theme),
(nautilus_theme_get_theme_data): Add code to free the default
theme on program exit to make leak detection easier.
* src/nautilus-main.c: (main): Clean up the memory used by the XML
parser on exit to make leak detection easier.
* libnautilus/Makefile.am:
* libnautilus/nautilus-bonobo-workarounds.c:
* libnautilus/nautilus-bonobo-workarounds.h:
Added version of bonobo_object_get_epv that shares a single global
instance instead of allocating a new one each time it's called.
* components/adapter/nautilus-adapter-factory-server.c:
(impl_Nautilus_ComponentAdapterFactory__create):
* libnautilus-extensions/bonobo-stream-vfs.c:
(bonobo_stream_vfs_class_init):
* libnautilus-extensions/nautilus-undo-context.c:
(impl_Nautilus_Undo_Context__create):
* libnautilus-extensions/nautilus-undo-manager.c:
(nautilus_undo_manager_initialize_class):
* libnautilus/nautilus-undo-transaction.c:
(impl_Nautilus_Undo_Transaction__create):
* libnautilus/nautilus-view.c: (impl_Nautilus_View__create):
* src/nautilus-history-frame.c:
(impl_Nautilus_HistoryFrame__create):
* src/nautilus-shell.c: (nautilus_shell_get_vepv):
* src/nautilus-view-frame-corba.c:
(impl_Nautilus_ViewFrame__create):
* src/nautilus-zoomable-frame-corba.c:
(impl_Nautilus_ZoomableFrame__create):
Use the new cover for bonobo_object_get_epv to avoid
making lots of copies of it.
* src/nautilus-window-menus.c: (get_user_level_image): Formatting
tweak.
* tools/leak-checker/nautilus-leak-checker.c: Added more "known to
allocate and not free on exit" functions.
Diffstat (limited to 'src/nautilus-main.c')
-rw-r--r-- | src/nautilus-main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nautilus-main.c b/src/nautilus-main.c index b94c30445..1948ec2bd 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -45,6 +45,7 @@ #include <libnautilus-extensions/nautilus-glib-extensions.h> #include <liboaf/liboaf.h> #include <gtk/gtkmain.h> +#include <parser.h> #include <popt.h> #include <stdlib.h> @@ -201,13 +202,12 @@ main (int argc, char *argv[]) } /* Initialize the services that we use. */ + g_atexit (xmlCleanupParser); g_thread_init (NULL); orb = oaf_init (argc, argv); - - if (getenv ("NAUTILUS_ENABLE_TEST_COMPONENTS") != NULL) { + if (g_getenv ("NAUTILUS_ENABLE_TEST_COMPONENTS") != NULL) { oaf_set_test_components_enabled (TRUE); } - gnome_vfs_init (); bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); bonobo_activate (); /* do now since we need it before main loop */ @@ -245,7 +245,7 @@ main (int argc, char *argv[]) * an update takes place. */ - if (getenv ("_NAUTILUS_RESTART") != NULL) { + if (g_getenv ("_NAUTILUS_RESTART") != NULL) { nautilus_unsetenv ("_NAUTILUS_RESTART"); /* Might eventually want to copy all the parameters |