##// END OF EJS Templates
del Widget.widgets[seld.model_id] in close rather than in __del__
Sylvain Corlay -
Show More
@@ -127,8 +127,6 b' class Widget(LoggingConfigurable):'
127 127 def __del__(self):
128 128 """Object disposal"""
129 129 self.close()
130 del Widget.widgets[self.model_id]
131 self._comm = None
132 130
133 131 #-------------------------------------------------------------------------
134 132 # Properties
@@ -166,9 +164,10 b' class Widget(LoggingConfigurable):'
166 164 Closes the underlying comm.
167 165 When the comm is closed, all of the widget views are automatically
168 166 removed from the front-end."""
167 del Widget.widgets[self.model_id]
169 168 if self._comm is not None:
170 169 self._comm.close()
171
170
172 171 def send_state(self, key=None):
173 172 """Sends the widget state, or a piece of it, to the front-end.
174 173
General Comments 0
You need to be logged in to leave comments. Login now