[epiphany] ephy-web-view: don't leak the snapsoht cairo surface
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-web-view: don't leak the snapsoht cairo surface
- Date: Tue, 4 Sep 2012 09:11:37 +0000 (UTC)
commit 3e7c36a33f512e47b9bc293db93112c109caaf0b
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Sep 4 11:46:49 2012 +0300
ephy-web-view: don't leak the snapsoht cairo surface
embed/ephy-web-view.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 234126e..ece575b 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2103,12 +2103,15 @@ web_view_check_snapshot (WebKitWebView *web_view)
{
EphyOverviewStore *store;
GtkTreeIter iter;
+ cairo_surface_t *surface;
store = EPHY_OVERVIEW_STORE (ephy_embed_shell_get_frecent_store (embed_shell));
if (ephy_overview_store_find_url (store, webkit_web_view_get_uri (web_view), &iter) &&
- ephy_overview_store_needs_snapshot (store, &iter))
- ephy_overview_store_set_snapshot (store, &iter,
- webkit_web_view_get_snapshot (web_view));
+ ephy_overview_store_needs_snapshot (store, &iter)) {
+ surface = webkit_web_view_get_snapshot (web_view);
+ ephy_overview_store_set_snapshot (store, &iter, surface);
+ cairo_surface_destroy (surface);
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]