As you develop your application, you should always consider how your design choices affect the performance of your application. Device memory still has its constraints even though there are improvements in computing power and memory. Performance and optimization within the device will not only achieve faster response times, but also help minimize memory usage and maximize battery life.
Memory is an important resource on mobile devices. When too much memory is being consumed, devices may force quit your application when you least expect it. Here are some things to be aware of while developing:
Eliminate memory leaks: Allowing leaks to exist means extra used memory in your application that takes up valuable space. Even though Lua does automatic memory management, memory leaks can still occur in your code. For example, when you introduce global variables into your application, it is your job to tell Lua when they are not needed anymore so memory can be freed....