FPS example help

There is a useful FPS routine here:

http://developer.anscamobile.com/code/output-fps-and-texture-memory-usage-your-app

But just wondering how exactly do I unload it from the Director screen?

What I mean is what exactly do I need to do in the cleanup() to make sure this is unloaded from memory correctly?

THANKS! [import]uid: 9371 topic_id: 3917 reply_id: 303917[/import]

Uhmm… guessing: probably add a method destroy() to the class which also removes the event listener ?!

Also remember our latest discussion wrt collecting “immediately”: http://developer.anscamobile.com/forum/2010/11/19/how-check-memory-leaks#comment-11727 [import]uid: 5750 topic_id: 3917 reply_id: 12302[/import]

Good idea… [import]uid: 9371 topic_id: 3917 reply_id: 12341[/import]