app: force deletion of child when app is stopped/leaving

This commit is contained in:
Mathieu Virbel 2012-10-08 12:49:42 +02:00
parent cbd9ed2f73
commit 1ddbd8b71e
1 changed files with 4 additions and 0 deletions

View File

@ -542,6 +542,10 @@ class App(EventDispatcher):
runTouchApp() runTouchApp()
self.dispatch('on_stop') self.dispatch('on_stop')
# Clear the window children
for child in Window.children:
Window.remove_widget(child)
def stop(self, *largs): def stop(self, *largs):
'''Stop the application. '''Stop the application.