Is there any way I can intercept this warning and do something about it before SafariMobile kills the app js?
My App has a 6 MB database that it reads and writes to on every screen, and when I run the Instruments Apple developer tool, the Titanium framework itself is taking ~ 7 MB of RAM, not leaving much room before I hit the 16 MB warning limit that my iPod Touch has.
One other thing I wonder, I'm not using the entire Titanium Mobile SDK. It's quite extensive, and mainly I just use Titanium.UI, Titanium.Database, Titanium.API, and Titanium.App. But the entire SDK gets compiled into the app… This seems like a waste, especially considering the memory limits of mobile devices. Is it possible to compile my app with only the bits of the SDK that I'm using and leave the rest out?
Just trying to figure out how to get myself a little more headroom… After the database and framework, the 2 MB I'm left with isn't a whole lot of headroom for a transactional app to do it's thing.
I have this same issue.
I've read that in Objective C, you can use
-(void)applicationDidReceiveMemoryWarning:(UIApplication *)applicationbut I'm wondering if there's an event in Titanium that would allow me to detect when memory is getting low.
Anyone have any ideas?
Sorry, there is no event that is fired when there is a memory warning.