diff options
author | Matt Watson <mattdangerw@gmail.com> | 2013-11-18 18:10:32 -0800 |
---|---|---|
committer | Matt Watson <mattdangerw@gmail.com> | 2013-11-18 18:10:32 -0800 |
commit | 69d4d459c1f4ce302ab7ed6995e74e60d765434e (patch) | |
tree | 714bf0858a7d82a6080b2dbc2681d7b2f487116d /wikipedia | |
parent | 55a17a7b71190543a36316244735f492084c235b (diff) |
Freed cairo context for BoxWithBg widget
This widget was used on the category page. Without the call to
$dispose there's a large memory leak each time the category page
is displayed on screen.
[endlessm/eos-sdk#408]
Diffstat (limited to 'wikipedia')
-rw-r--r-- | wikipedia/widgets/BoxWithBg.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wikipedia/widgets/BoxWithBg.js b/wikipedia/widgets/BoxWithBg.js index 1ae9404..6d38bd3 100644 --- a/wikipedia/widgets/BoxWithBg.js +++ b/wikipedia/widgets/BoxWithBg.js @@ -6,14 +6,16 @@ const BoxWithBg = new Lang.Class({ Name: "BoxWithBg", Extends: Gtk.Box, - vfunc_draw: function(cairoContext) { + vfunc_draw: function(cr) { let width = this.get_allocated_width(); let height = this.get_allocated_height(); let context = this.get_style_context(); - Gtk.render_background(context, cairoContext, 0, 0, width, height); - Gtk.render_frame(context, cairoContext, 0, 0, width, height); + Gtk.render_background(context, cr, 0, 0, width, height); + Gtk.render_frame(context, cr, 0, 0, width, height); - return this.parent(cairoContext); + let ret = this.parent(cr); + cr.$dispose(); + return ret; } }); |