[polari] Explicitly destroy widgets



commit d04354b2fa8f05a2fa4699b374e89a4bdaaf2065
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Sep 21 17:09:23 2014 +0200

    Explicitly destroy widgets
    
    Don't rely on GC to pick those up for us ...

 src/roomList.js |    2 +-
 src/userList.js |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index 71cc6ee..d3baf14 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -304,7 +304,7 @@ const RoomList = new Lang.Class({
             return;
 
         this._moveSelectionFromRow(roomRow.widget);
-        this.widget.remove(roomRow.widget);
+        roomRow.widget.destroy();
         delete this._roomRows[room.id];
     },
 
diff --git a/src/userList.js b/src/userList.js
index 79e0e44..a8a0c94 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -416,8 +416,8 @@ const UserList = new Lang.Class({
 
     _removeMember: function(member) {
         let row = this._rows[member];
-        if (row && row.widget.get_parent())
-            this._list.remove(row.widget);
+        if (row)
+            row.widget.destroy();
         delete this._rows[member];
     },
 


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