[polari] chatView: Explicitly dispose cairo context



commit 9b82eaa19fb368b60ed90a9281a3066e1ac0fb1a
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 30 21:44:48 2013 +0100

    chatView: Explicitly dispose cairo context
    
    The context itself is managed by GTK+, but the JS wrapper object
    is not. While the GC is expected to clean it up for us, it's buggy
    and prone to leaks (which is fairly bad in a frequently called
    function like draw()), so force a dispose() when no longer needed.

 src/chatView.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index b25a25f..54f4fd1 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -54,6 +54,7 @@ const TextView = new Lang.Class({
         Gdk.cairo_set_source_rgba(cr, this._dimColor);
         cr.rectangle(0, y + INDICATOR_OFFSET, this.get_allocated_width(), 1);
         cr.fill();
+        cr.$dispose();
     },
 
     _onMarkSet: function(buffer, iter, mark) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]