implement proper 'destroy' functions in Converter
[enigma2.git] / lib / python / Components / Element.py
index baab4cfb46d30284be8d3836d61e346e49a8b5bf..437d934bb507529969571bdeaa487c1503dc825e 100644 (file)
@@ -48,11 +48,13 @@ class Element(object):
                # we should not disconnect from upstream if
                # there are still elements depending on us.
                assert len(self.downstream_elements) == 0, "there are still downstream elements left"
-               
+
                # Sources don't have a source themselves. don't do anything here.
                if self.source is not None:
                        self.source.disconnectDownstream(self)
-       
+                       # sources are owned by the Screen, so don't destroy them here.
+                       self.destroy()
+
        def disconnectDownstream(self, downstream):
                self.downstream_elements.remove(downstream)
                if self.master == downstream:
@@ -89,3 +91,6 @@ class Element(object):
 
        def doSuspend(self, suspend):
                pass
+
+       def destroy(self):
+               pass