I'm developing an application for Android and iOS. I'm confused about memory management. Can anyone give some advices or share your experience about this.
2 Answers
Hi Huy,
Generally, Titanium'll take care of freeing memory. However, it'd better if you can instruct it when an object can be collectable. Here're some tips:
- Be careful not to pollute the global object
- Run in a single JavaScript context
- Modular using CommonJS modules approach instead of Ti.include()
- Defer loading JS until needed
Check full story here.
Hope that help.
for iOS you can run the profiler from Xcode. watch this video, if you're working on the same app for Android, everything should translate.
Your Answer
Think you can help? Login to answer this question!