You mostly have to care about memory leaks. You have a VERY important webcast on the subject.
In short; be very careful to :
- avoid big global objects : they have references to the world, so these references won't be cleared
- eliminate any circular dependances : the garbage collector is NOT a garbage collector ! It just count references and kill objects when there is 0 refs. With circular objects, there is always 1 ref.
- Avoid events on Ti.App : ouch that sucks ! But the object that ask addEventListener is for ever in the Ti.App listener bus. The bus keeps a reference to send the event to that object, so it will be there forever, so will be its references.
- Be careful with other events.
- Be also careful with animations : they have callbacks that have references to the application. These callbacks are function (so variables) that may stay in memory, so do its references.
In short, your application must be as close as possible to a simple tree with no backward reference. Write myDownObject=null when you go up in the tree.
Use HEAVILY Instruments on your mac, with a 'Proxy' filter. All titanium objects are UIProxy.