add disconnect to elements, and disconnect renderer from sources on screen close
[enigma2.git] / lib / python / Screens / Screen.py
index bbc6b1e..5f1cf6d 100644 (file)
@@ -64,6 +64,13 @@ class Screen(dict, HTMLSkin, GUISkin):
                # fixup circular references
                del self.helpList
                GUISkin.close(self)
                # fixup circular references
                del self.helpList
                GUISkin.close(self)
+
+               # first disconnect all render from their sources.
+               # we might split this out into a "unskin"-call,
+               # but currently we destroy the screen afterwards
+               # anyway.
+               for val in self.renderer:
+                       val.disconnectAll()  # disconnected converter/sources and probably destroy them
                
                del self.session
                for (name, val) in self.items():
                
                del self.session
                for (name, val) in self.items():