summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 19:26:23 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 19:26:23 +0000
commit3fdc51c8c84c98d539a10436b14b6fd707d9c91b (patch)
tree658ee76180ff3a5bbb2ce17ddd480815d33c6e06
parentf0f622e1d312e4776edd14688145fd99e4e8114e (diff)
downloadchromium_src-3fdc51c8c84c98d539a10436b14b6fd707d9c91b.zip
chromium_src-3fdc51c8c84c98d539a10436b14b6fd707d9c91b.tar.gz
chromium_src-3fdc51c8c84c98d539a10436b14b6fd707d9c91b.tar.bz2
Fix leaking gtk tree models.
BUG=19750 TEST=none Review URL: http://codereview.chromium.org/174463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24497 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/hung_renderer_dialog_gtk.cc1
-rw-r--r--chrome/browser/gtk/keyword_editor_view.cc1
-rw-r--r--chrome/browser/gtk/options/cookies_view.cc2
-rw-r--r--chrome/browser/gtk/options/exceptions_page_gtk.cc2
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc1
-rw-r--r--chrome/browser/gtk/options/languages_page_gtk.cc1
-rw-r--r--chrome/browser/gtk/options/passwords_page_gtk.cc2
-rw-r--r--chrome/browser/gtk/options/url_picker_dialog_gtk.cc2
8 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
index 6ddf34c..2c91ab7 100644
--- a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
@@ -128,6 +128,7 @@ void HungRendererDialogGtk::Init() {
model_ = gtk_list_store_new(COL_COUNT, GDK_TYPE_PIXBUF, G_TYPE_STRING);
GtkWidget* tree_view = gtk_tree_view_new_with_model(
GTK_TREE_MODEL(model_));
+ g_object_unref(model_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), FALSE);
GtkTreeViewColumn* column = gtk_tree_view_column_new();
GtkCellRenderer* renderer = gtk_cell_renderer_pixbuf_new();
diff --git a/chrome/browser/gtk/keyword_editor_view.cc b/chrome/browser/gtk/keyword_editor_view.cc
index 7257516..f3e6e19 100644
--- a/chrome/browser/gtk/keyword_editor_view.cc
+++ b/chrome/browser/gtk/keyword_editor_view.cc
@@ -119,6 +119,7 @@ void KeywordEditorView::Init() {
G_TYPE_INT,
G_TYPE_BOOLEAN);
tree_ = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_store_));
+ g_object_unref(list_store_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_), TRUE);
gtk_tree_view_set_row_separator_func(GTK_TREE_VIEW(tree_),
OnCheckRowIsSeparator,
diff --git a/chrome/browser/gtk/options/cookies_view.cc b/chrome/browser/gtk/options/cookies_view.cc
index 9db792f..bfe1590 100644
--- a/chrome/browser/gtk/options/cookies_view.cc
+++ b/chrome/browser/gtk/options/cookies_view.cc
@@ -169,6 +169,8 @@ void CookiesView::Init() {
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(list_sort_),
COL_SITE, GTK_SORT_ASCENDING);
tree_ = gtk_tree_view_new_with_model(GTK_TREE_MODEL(list_sort_));
+ g_object_unref(list_store_);
+ g_object_unref(list_sort_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_), TRUE);
gtk_container_add(GTK_CONTAINER(scroll_window), tree_);
diff --git a/chrome/browser/gtk/options/exceptions_page_gtk.cc b/chrome/browser/gtk/options/exceptions_page_gtk.cc
index a104ada..bcebb90 100644
--- a/chrome/browser/gtk/options/exceptions_page_gtk.cc
+++ b/chrome/browser/gtk/options/exceptions_page_gtk.cc
@@ -78,6 +78,8 @@ void ExceptionsPageGtk::InitExceptionTree() {
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(exception_list_sort_),
COL_SITE, CompareSite, this, NULL);
exception_tree_ = gtk_tree_view_new_with_model(exception_list_sort_);
+ g_object_unref(exception_list_store_);
+ g_object_unref(exception_list_sort_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(exception_tree_), TRUE);
exception_selection_ = gtk_tree_view_get_selection(
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index 96e8431..ae97778 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -313,6 +313,7 @@ GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() {
G_TYPE_STRING);
default_search_engine_combobox_ = gtk_combo_box_new_with_model(
GTK_TREE_MODEL(default_search_engines_model_));
+ g_object_unref(default_search_engines_model_);
g_signal_connect(G_OBJECT(default_search_engine_combobox_), "changed",
G_CALLBACK(OnDefaultSearchEngineChanged), this);
gtk_container_add(GTK_CONTAINER(hbox), default_search_engine_combobox_);
diff --git a/chrome/browser/gtk/options/languages_page_gtk.cc b/chrome/browser/gtk/options/languages_page_gtk.cc
index b962cc2..3c734bd 100644
--- a/chrome/browser/gtk/options/languages_page_gtk.cc
+++ b/chrome/browser/gtk/options/languages_page_gtk.cc
@@ -156,6 +156,7 @@ void LanguagesPageGtk::Init() {
G_TYPE_STRING);
language_order_tree_ = gtk_tree_view_new_with_model(
GTK_TREE_MODEL(language_order_store_));
+ g_object_unref(language_order_store_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(language_order_tree_), FALSE);
GtkTreeViewColumn* lang_column = gtk_tree_view_column_new_with_attributes(
"",
diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc
index 93da53b..cab4fe2 100644
--- a/chrome/browser/gtk/options/passwords_page_gtk.cc
+++ b/chrome/browser/gtk/options/passwords_page_gtk.cc
@@ -111,6 +111,8 @@ void PasswordsPageGtk::InitPasswordTree() {
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(password_list_sort_),
COL_USERNAME, CompareUsername, this, NULL);
password_tree_ = gtk_tree_view_new_with_model(password_list_sort_);
+ g_object_unref(password_list_store_);
+ g_object_unref(password_list_sort_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(password_tree_), TRUE);
password_selection_ = gtk_tree_view_get_selection(
diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
index 99c09e42..9122bc7 100644
--- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
+++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
@@ -110,6 +110,8 @@ UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback,
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(history_list_sort_),
COL_DISPLAY_URL, CompareURL, this, NULL);
history_tree_ = gtk_tree_view_new_with_model(history_list_sort_);
+ g_object_unref(history_list_store_);
+ g_object_unref(history_list_sort_);
gtk_container_add(GTK_CONTAINER(scroll_window), history_tree_);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(history_tree_),
TRUE);