ivansafrin/Polycode — pull request #152 by mcclure (2013-02-17 03:03:55+00:00)
Title: Pervasive leaks and memory unsafety in UI module

Run the UIDemo.lua currently in the Polycode repo. Okay, now delete all those objects you just created. The Polycode Player will promptly crash.

This patch fixes the following:

- Most UI module classes were not deleting their children, causing leaks.

- Important classes in UI module were not unregistering their listeners on delete, causing crashes.

- UIWindow had a thing where something really ugly would happen if you performed a show/hide before the last show/hide was complete.

- Outside the UI module, Tweens had a problem where manually deleting a Tween with "delete on complete" flag would cause an infinite loop.