Profiling my app

I am looking for a way to profile my app and get a better handle on memory management. I am building classes like the example here: http://lua-users.org/wiki/ObjectOrientationTutorial and am using Object:new Object:delete to simulate constructors/deconstructors. One thing I am running into though is a lack of a meaningful way to look at what is happening with memory as I go through this stuff. Everything felt simple enough while building a single screen, but now that I am looking to move onto scenes I really want to dig in and figure out how to get things in and out gracefully.

Is there anything in the debugger (or debugging tools) to give out useful memory information? It would be nice at bare minimum to see what I am allocating and deallocating so that I can catch objects that may be kept in memory. Is there anything to get a list of what’s currently in memory with a map of references? Any links or advice on this subject would be greatly appreciated. [import]uid: 4555 topic_id: 5854 reply_id: 305854[/import]

There’s a module in the code exchange called FPS
http://developer.anscamobile.com/code/output-fps-and-texture-memory-usage-your-app [import]uid: 12635 topic_id: 5854 reply_id: 20153[/import]

Nice thank you. This will be very convenient for optimizing performance. Is there anything that deals with standard memory and overall allocations of lua? I really need to make sure that things are locked down tight as I go because of the way that the iphone handles multitasking. If I am somehow leaving values of a table floating around or a leaked reference to a table the app will grow and grow in size since no one really quits their apps anymore.

Also if there aren’t any tools like this, is there a way to reset the virtual machine if needed? [import]uid: 4555 topic_id: 5854 reply_id: 20165[/import]