diff options
author | Xan Lopez <xan@gnome.org> | 2010-11-22 06:15:05 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-11-22 06:16:15 +0800 |
commit | d3012a7f87b3d55effdbb20806d97528431b70cf (patch) | |
tree | b0b6a349ce51ec0a71b33920dec8c4912a5748b9 | |
parent | 8e5a300ccf15f9b2c80befb6ae489bace20cb3ef (diff) | |
download | gsoc2013-epiphany-d3012a7f87b3d55effdbb20806d97528431b70cf.tar.gz gsoc2013-epiphany-d3012a7f87b3d55effdbb20806d97528431b70cf.tar.zst gsoc2013-epiphany-d3012a7f87b3d55effdbb20806d97528431b70cf.zip |
ephy-web-view: manually unref DOM objects when needed
Some DOM objects are not garbage collected by WebKit (since they are
not in the DOM tree), manually unref them when they are not needed
anymore.
-rw-r--r-- | embed/ephy-web-view.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index e1d25e237..e45ecf2d9 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -656,6 +656,8 @@ find_username_and_password_elements (WebKitDOMNode *form_node, g_free (element_type); } } + + g_object_unref(elements); } typedef struct { @@ -938,6 +940,7 @@ _ephy_web_view_hook_into_forms (EphyWebView *web_view) if (forms_n == 0) { LOG ("No forms found."); + g_object_unref(forms); return; } @@ -962,6 +965,8 @@ _ephy_web_view_hook_into_forms (EphyWebView *web_view) } else LOG ("No pre-fillable/hookable form found"); } + + g_object_unref(forms); } static void @@ -978,6 +983,7 @@ _ephy_web_view_hook_into_links (EphyWebView *web_view) if (links_n == 0) { LOG ("No links found."); + g_object_unref(links); return; } @@ -1023,6 +1029,8 @@ _ephy_web_view_hook_into_links (EphyWebView *web_view) g_free (rel); } + + g_object_unref(links); } static void |