hawkthorne/hawkthorne-journey — pull request #1816 by kyleconroy (2013-10-26 03:07:59+00:00)
Title: Fix memory leaks

Finally fix #1369

Here's a tale for all you developers. Be very wary of periodic timers. The old code looked like this:

```lua
Timer.addPeriodic( interval, function()
sprite.animation:gotoFrame(1)
sprite.animation.status = 'playing'
end)
```

That would create a reference to `sprite` for every timer. Since the timer was never canceled, the references just sat around, never to be cleaned up. The new code manually creates a timer, stopping the leak.

You'll also find that the debug graph is much easier to use, as we now run garbage collection every update when in debug mode.